scotch ftbfs when using default stack protector flags

Bug #2058094 reported by Steve Langasek
6
This bug affects 1 person
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_scotch_graph_map data/m4x4_b100000.grf
*** 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/bgraph_bipart_gg.c:

  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_SOURCE=2.

This is less than ideal, so I'm opening a bug on scotch+gcc to track it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.