Comment #8 on issue 884 by emit.sorrels: shell sample Infinite loop in JSObject::LookupCallbackSetterInPrototypes
http://code.google.com/p/v8/issues/detail?id=884

ok I'm attaching the disassembly for the method: "working.txt" and "notworking.txt"
, the root of the problem may be elsewhere

notworking.txt was compiled with -O1 -fstrict-aliasing

with -O1 -fstrict-aliasing/debug mode, an assertion error is raised and the shell example quits with:

#
# Fatal error in src/contexts.h, line 167
# CHECK(context->IsContext()) failed
#

Aborted

-----------------------------------------

if I compile with -O3 debug mode (=> -Werror -W<...> etc) the project doesn't even compile:

g++ -o obj/debug/builtins.o -c -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m64 -g -O3 -fstrict-aliasing -ansi -fno-rtti -fno-exceptions -fvisibility=hidden -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m64 -g -O3 -fstrict-aliasing -ansi -DV8_TARGET_ARCH_X64 -DENABLE_DISASSEMBLER -DDEBUG -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DV8_ENABLE_CHECKS -DENABLE_DEBUGGER_SUPPORT -Isrc src/builtins.cc
cc1plus: warnings being treated as errors
src/checks.h: In function 'v8::internal::Object* v8::internal::Builtin_FastHandleApiCall(v8::internal::<unnamed>::FastHandleApiCallArgumentsType)': src/checks.h:61:3: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false src/arguments.h:52:5: error: assuming signed overflow does not occur when assuming that (X - c) <= X is always true
scons: *** [obj/debug/builtins.o] Error 1
scons: building terminated because of errors


so in summary for g++ 4.5.1:

Release mode flags +:
-O0 or -O1 : works fine
-O2 -fno-strict-aliasing : works fine
-O3 -fno-strict-aliasing : works fine
-O2 or -O3 : infinite loop

Debug mode flags +:
-O0 or -O1 : works fine
-O1 -fstrict-aliasing : compiles but runtime assertion failure
-O3 : does not compile

Attachments:
        working.txt  4.0 KB
        notworking.txt  3.8 KB

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to