Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-28 Thread Branko Čibej
On 28. 2. 25 15:23, Daniel Sahlberg wrote: Den fre 28 feb. 2025 kl 15:16 skrev Stefan Sperling : On Fri, Feb 28, 2025 at 02:14:34PM +0100, Branko Čibej wrote: > This is probably the minimal patch to disable this tweak. Thanks, your diff looks good to me. > There's a bunch of

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-28 Thread Daniel Sahlberg
Den fre 28 feb. 2025 kl 15:16 skrev Stefan Sperling : > On Fri, Feb 28, 2025 at 02:14:34PM +0100, Branko Čibej wrote: > > This is probably the minimal patch to disable this tweak. > > Thanks, your diff looks good to me. > > > There's a bunch of > > code that needs to be replaced or removed, though

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-28 Thread Stefan Sperling
On Fri, Feb 28, 2025 at 02:14:34PM +0100, Branko Čibej wrote: > This is probably the minimal patch to disable this tweak. Thanks, your diff looks good to me. > There's a bunch of > code that needs to be replaced or removed, though. These bits of code are easy to spot and remove. Here is a diff f

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-28 Thread Branko Čibej
On 28. 2. 25 13:45, Branko Čibej wrote: On 26. 2. 25 15:20, Stefan Sperling wrote: On Wed, Feb 26, 2025 at 02:54:43PM +0100, Daniel Sahlberg wrote: Should have researched a bit more before replying. There was already some code to do exactly this, but it was removed in r1722879: [[[ stefan2 20

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-28 Thread Branko Čibej
On 26. 2. 25 15:20, Stefan Sperling wrote: On Wed, Feb 26, 2025 at 02:54:43PM +0100, Daniel Sahlberg wrote: Should have researched a bit more before replying. There was already some code to do exactly this, but it was removed in r1722879: [[[ stefan2 2016-01-04 15:17:04 Stop using pointer arit

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-27 Thread Sam James
Daniel Sahlberg writes: > Den ons 26 feb. 2025 kl 14:45 skrev Daniel Sahlberg > : > > Den ons 26 feb. 2025 kl 14:30 skrev Stefan Sperling : > > On Wed, Feb 26, 2025 at 01:24:22PM +0100, Daniel Sahlberg wrote: > > Looking at the code, I'm assuming that if SVN_UNALIGNED_ACCESS_IS_OK was > > se

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-27 Thread Sam James
Daniel Sahlberg writes: > Den ons 26 feb. 2025 kl 12:33 skrev Sam James : > > Hi! > > Hi, Hi Daniel, > > Thanks for the detailed report! And thank you for the quick response (and Stefan too). > > When subversion-1.14.5 is built with upcoming GCC 15 with -O3 -mavx (or > -O2 -mavx -fno-vect-

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-26 Thread Stefan Sperling
On Wed, Feb 26, 2025 at 02:54:43PM +0100, Daniel Sahlberg wrote: > Should have researched a bit more before replying. There was already some > code to do exactly this, but it was removed in r1722879: > > [[[ > stefan2 2016-01-04 15:17:04 > Stop using pointer arithmetics to check for proper alignm

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-26 Thread Daniel Sahlberg
Den ons 26 feb. 2025 kl 14:45 skrev Daniel Sahlberg < daniel.l.sahlb...@gmail.com>: > Den ons 26 feb. 2025 kl 14:30 skrev Stefan Sperling : > >> On Wed, Feb 26, 2025 at 01:24:22PM +0100, Daniel Sahlberg wrote: >> > Looking at the code, I'm assuming that if SVN_UNALIGNED_ACCESS_IS_OK was >> > set t

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-26 Thread Daniel Sahlberg
Den ons 26 feb. 2025 kl 14:30 skrev Stefan Sperling : > On Wed, Feb 26, 2025 at 01:24:22PM +0100, Daniel Sahlberg wrote: > > Looking at the code, I'm assuming that if SVN_UNALIGNED_ACCESS_IS_OK was > > set to 0 (so the char by char loop after #endif is used instead), the > code > > would run just

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-26 Thread Stefan Sperling
On Wed, Feb 26, 2025 at 01:24:22PM +0100, Daniel Sahlberg wrote: > Looking at the code, I'm assuming that if SVN_UNALIGNED_ACCESS_IS_OK was > set to 0 (so the char by char loop after #endif is used instead), the code > would run just fine. Can you confirm that? > > SVN_UNALIGNED_ACCESS_IS_OK is de

Re: Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-26 Thread Daniel Sahlberg
Den ons 26 feb. 2025 kl 12:33 skrev Sam James : > Hi! > Hi, Thanks for the detailed report! > When subversion-1.14.5 is built with upcoming GCC 15 with -O3 -mavx (or > -O2 -mavx -fno-vect-cost-model), it crashes in some cases in > svn_eol__find_eol_start. > > We found `svn checkout https://svn

Unaligned access in svn_eol__find_eol_start causes crash w/ upcoming GCC 15

2025-02-26 Thread Sam James
Hi! When subversion-1.14.5 is built with upcoming GCC 15 with -O3 -mavx (or -O2 -mavx -fno-vect-cost-model), it crashes in some cases in svn_eol__find_eol_start. We found `svn checkout https://svn.code.sf.net/p/sdcc/code/trunk/sdcc` was a reliable reproducer, as was `svn cleanup sdcc` once the fi