Bug #11676
closedMissing inspect for T_IMEMO during make with -DCPDEBUG=2
Description
When I pass -DCPDEBUG=2 (or higher) to the CFLAGS the compilation process fails when miniruby is invoked:
CC = clang
LD = ld
LDSHARED = clang -dynamic -bundle
CFLAGS = -O0 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -Werror=division-by-zero -Werror=deprecated-declarations -Werror=extra-tokens -pipe -DCPDEBUG=2
XCFLAGS = -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. -I.ext/include/x86_64-darwin14 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -fstack-protector -Wl,-u,_objc_msgSend -Wl,-pie -framework CoreFoundation
SOLIBS =
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.4.0
Thread model: posix
generating enc.mk
[...] Removed a lot of debug messages from miniruby [...]
[compile step: finish]
[new_child_iseq]< ---------------------------------------
./enc/make_encmake.rb: method `inspect' called on unexpected T_IMEMO object (0x007fd8c2847338 flags=0x703a) (NotImplementedError)
make: *** [enc.mk] Error 1
Since I didn't know any better, I reduced enc/make_encmake.rb to a simple test case (def foo; end) to obtain a stack trace with some frame variables - in case this helps.
The lldb output is attached in the file.
I have also verified the presence of this bug when building under Ubuntu with GCC.
Files