scotch ftbfs when using default stack protector flags
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-13 (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
scotch (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
scotch ftbfs in Ubuntu (but not in Debian) with a buffer overflow error in the testsuite.
./test_
*** buffer overflow detected ***: terminated
I have examined the source and run the code under gdb and cannot confirm that there is a buffer overflow here.
The code triggering the assertion is in src/libscotch/
flagtax = (byte *) (vexxtax + grafptr->s.baseval) - grafptr->s.baseval; /* Re-
use extended vertex array for flag array */
memSet (flagtax + grafptr->s.baseval, ~0, grafptr->s.vertnbr * sizeof (byte));
There's a lot in this code that's ugly (a lot of deliberate setting of pointers to addresses that are outside of allocated space), but as best I'm able to tell this is not an out-of-bounds write. However, with the terrible pointer manipulation it's quite likely that this has confused the compiler.
The only way I've found to work around this (without taking a scalpel to the scotch code) is by downgrading to -D_FORTIFY_
This is less than ideal, so I'm opening a bug on scotch+gcc to track it.