On Tue, 2025-10-14 at 19:16 +0200, Gregor Riepl wrote:
> > 
> > Well, the bus error is well visible when running the xdelta3 testsuite.
> 
> Well, the bus error in xdelta3 itself yes... but I was referring to the 
> autconf check.
> This one _doesn't_ cause a bus error (as it should), when it's compiled with 
> optimization.
> If it was, configure could detect it and and automatically set 
> ax_cv_have_aligned_access_required=yes
> - which will then set a macro that disables all the code that causes 
> unaligned access.

Does that mean that the unaligned access is intentional? Why is there an option 
to disable it?

> If the autoconf check script is compiled with -O0, it will cause a bus error, 
> which is what
> I suggested as a solution. I'm not sure how to fix this script so it will 
> trigger the bus error
> even with -Os or -O3.

I'm not sure I'm following. Does the code actually trap SIGBUS to determine 
whether there was
an unaligned access and the SIGBUS does not occir with -O0?

> The rest of xdelta3 can be compiled with -O3/-Os just fine, as long as the 
> macro is set.

And the testsuite passes as well?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

Reply via email to