Re: Improving and extending int128.h to more of numeric.c

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: John Naylor <johncnaylorls(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Improving and extending int128.h to more of numeric.c
Date: 2025-10-25 10:33:49
Message-ID: CAEZATCWosNg7USM_7o06AYx8CsQNV5Go3ND=T9udXTM7ffxwKA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 24 Oct 2025 at 20:30, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
>
> On Fri, 24 Oct 2025 at 15:23, Andres Freund <andres(at)anarazel(dot)de> wrote:
> >
> > FWIW, there are a few interesting messages on the host of my buildfarm animal:
> >
> > Aug 19 02:05:31 andres-postgres-buildfarm-v6 kernel: traps: test_int128[1678696] trap divide error ip:55764d59802c sp:7fffc378f7f8 error:0 in test_int128[402c,55764d595000+4000]
> > Oct 15 03:08:28 andres-postgres-buildfarm-v6 kernel: traps: test_int128[1984641] trap divide error ip:405a8c sp:7ffc41a93c88 error:0 in test_int128[5a8c,401000+5000]
> > Oct 15 20:02:15 andres-postgres-buildfarm-v6 kernel: traps: test_int128[3346617] trap divide error ip:404b4c sp:7ffc709ab658 error:0 in test_int128[4b4c,401000+4000]
> >
>
> Ah, I presume this is because there is a small, but non-zero chance
> that the test code will attempt to divide by zero, so it needs to make
> sure that z32 is non-zero. Will fix.

I was able to produce a division-by-zero failure by running the full 1
billion iteration test a few times, and I've pushed a fix for it.

Regards,
Dean

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2025-10-25 11:59:09 Re: Asynchronous MergeAppend
Previous Message Chao Li 2025-10-25 07:57:11 Re: Feature: psql - display current search_path in prompt