oink-stack icon indicating copy to clipboard operation
oink-stack copied to clipboard

Segfault when running elkhound/elkhound elkhound/examples/crash1.gr on Mac OS X

Open sam-ellis opened this issue 8 years ago • 0 comments

Receive a segfault when running elkhound/elkhound elkhound/examples/crash1.gr on Mac OS X. Have built the tools using Apple LLVM version 8.0.0 (clang-800.0.38). Debegging segfault reveals the cause to be dereferencing a null pointer when calling LocString::<< operator (loc.str is NULL). From the comments in ast/locstr.h I see that the loc.str is permitted to be NULL:

  // experimenting with allowing 'str' to be null, which is convenient
  // when the string table isn't available

In that case, the << operators should deal gracefully with str==NULL.

sam-ellis avatar Oct 15 '16 19:10 sam-ellis