Comment #1 on issue 2807 by [email protected]: compile failure on
conversions.cc on linux gcc 4.6.3 w/ -Wall -O2 -DDEBUG
http://code.google.com/p/v8/issues/detail?id=2807
Here's the actual compiler command and the error:
g++ '-DV8_TARGET_ARCH_X64' '-DENABLE_DEBUGGER_SUPPORT' '-DENABLE_GDB_JIT_INTERFACE' '-DBUILDING_V8_SHARED' '-DV8_SHARED' '-DENABLE_DISASSEMBLER' '-DV8_ENABLE_CHECKS' '-DOBJECT_PRINT' '-DVERIFY_HEAP' '-DDEBUG' '-DENABLE_EXTRA_CHECKS'
-I../src -Wall -Werror -W -Wno-unused-parameter -pthread -fno-exceptions
-pedantic -ansi -fPIC -m64 -m64 -g -Wall -Werror -W -Wno-unused-parameter
-Wnon-virtual-dtor -Woverloaded-virtual -fdata-sections -ffunction-sections
-O3 -Wall -Werror -W -Wno-unused-parameter -Wnon-virtual-dtor
-Woverloaded-virtual -fdata-sections -ffunction-sections -O3
-Wnon-virtual-dtor -fno-rtti -MMD -MF
/media/SSD/src/bl/src/v8/out/x64.debug/.deps//media/SSD/src/bl/src/v8/out/x64.debug/obj.target/v8_base.x64/src/conversions.o.d.raw
-c -o
/media/SSD/src/bl/src/v8/out/x64.debug/obj.target/v8_base.x64/src/conversions.o ../src/conversions.cc
In file included from ../src/conversions.cc:32:0:
../src/conversions-inl.h: In function ‘double
v8::internal::InternalStringToDouble(v8::internal::UnicodeCache*, Iterator,
EndMark, int, double) [with Iterator = const short unsigned int*, EndMark =
const short unsigned int*]’:
../src/conversions-inl.h:700:3: error: array subscript is above array
bounds [-Werror=array-bounds]
../src/conversions-inl.h: In function ‘double
v8::internal::InternalStringToDouble(v8::internal::UnicodeCache*, Iterator,
EndMark, int, double) [with Iterator = const char*, EndMark = const char*]’:
../src/conversions-inl.h:700:3: error: array subscript is above array
bounds [-Werror=array-bounds]
cc1plus: all warnings being treated as errors
make[1]: ***
[/media/SSD/src/bl/src/v8/out/x64.debug/obj.target/v8_base.x64/src/conversions.o]
Error 1
Rmove -DDEBUG, or change to -O1, and the problem goes away.
diff --git a/src/conversions-inl.h b/src/conversions-inl.h
index 2f0a399..de0f812 100644
--- a/src/conversions-inl.h
+++ b/src/conversions-inl.h
@@ -692,7 +692,10 @@ double InternalStringToDouble(UnicodeCache*
unicode_cache,
exponent--;
}
- ASSERT(buffer_pos < kBufferSize);
+ if (buffer_pos >= kBufferSize) {
+ ASSERT(false);
+ return JunkStringValue();
+ }
buffer[buffer_pos] = '\0';
double converted = Strtod(Vector<const char>(buffer, buffer_pos),
exponent);
Is one possible solution ...
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.