Hi all,

I'm doing an experiment: turning on increased checks in Chromium's copy of
libcxx (LLVM's C++ library). I use this diff:

diff --git a/build/config/c++/BUILD.gn b/build/config/c++/BUILD.gn
index f1c18b9f35fd..3718fc40773d 100644
--- a/build/config/c++/BUILD.gn
+++ b/build/config/c++/BUILD.gn
@@ -68,11 +68,12 @@ config("runtime_library") {
     # libc++ has two levels of debug mode. Setting _LIBCPP_DEBUG to zero
     # enables most assertions. Setting it to one additionally enables
iterator
     # debugging. See https://libcxx.llvm.org/docs/DesignDocs/DebugMode.html
-    if (enable_iterator_debugging) {
-      defines += [ "_LIBCPP_DEBUG=1" ]
-    } else if (is_debug || dcheck_always_on) {
-      defines += [ "_LIBCPP_DEBUG=0" ]
-    }
+    #if (enable_iterator_debugging) {
+    #  defines += [ "_LIBCPP_DEBUG=1" ]
+    #} else if (is_debug || dcheck_always_on) {
+    #  defines += [ "_LIBCPP_DEBUG=0" ]
+    #}
+    defines += [ "_LIBCPP_DEBUG=1" ]
   }

_LIBCPP_DEBUG=1 turns on debugging checks in many std:: classes, and also
checks in iterators. (_LIBCPP_DEBUG=0 turns on debugging checks but *not* in
iterators.)

When building, I get this explosion:

ninja: Entering directory `out/Release'
[1/1] Regenerating ninja files
[39041/39294] ACTION
//v8:run_mksnapshot_default(//build/toolchain/linux:clang_x64)
FAILED: gen/v8/embedded.S snapshot_blob.bin
python ../../v8/tools/run.py ./mksnapshot --turbo_instruction_scheduling
--target_os=linux --target_arch=x64 --embedded_src gen/v8/embedded.S
--embedded_variant Default --random-seed 314159265 --startup_blob
snapshot_blob.bin --no-native-code-counters
../../buildtools/third_party/libc++/trunk/include/__hash_table:337:
_LIBCPP_ASSERT '__get_const_db()->__dereferenceable(this)' failed.
Attempted to dereference a non-dereferenceable unordered container iterator
Return code is -6
ninja: build stopped: subcommand failed.

Unfortunately, I don't know how to get you a better error message. Any
clues on that? Assuming the check itself is correct, it looks like there's
a bug somewhere in V8.

-- 
-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAOuvq215no2U-fixiQomf1Zw2LAE1a2Qwo0_fqDi-RWO82qROg%40mail.gmail.com.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to