On Thu, Oct 04, 2018 at 06:41:46PM -0400, doctormo@...400... wrote:
Dear Devs,
In a clean up on gradient/sp-stop code[1] I've gotten it all working, but for the style-test program itself which crashes with a stack guard error "stack smashing error". The problem only appears if you compile with `-fstack-protector` which is default ON for Ubuntu, but is not for windows and other OSes.
I attempted to use Valgrind (with --tool=exp-sgcheck) but that crashed too. Possibly because of the stack-protector which I can't seem to turn off.
I wanted to also try `-fsanitize=address` to winkle out the problem, but I have no idea where to add CFLAGS in CMake/ninja. So without being able to try other build options, I'm very lost.
Any help would be brilliant.
IIRC, stack smashing checks for out of bounds access on arrays, and is done at the kernel level; it's not intended to be turned off (other than building your own kernel I guess), it usually indicates a valid error. Your code doesn't appear to actually manipulate arrays directly, but maybe something is being modified implicitly? Does the error provide any backtrace or more detailed error message that might indicate where it's failing? The valgrind output might be interesting too.
Bryce
Best Regards, Martin Owens
[1] https://gitlab.com/inkscape/inkscape/merge_requests/348
Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel