Re: Segmentation fault when disposing of an isolate.

48 views
Skip to first unread message
Message has been deleted

Tom Hanks

unread,
Dec 20, 2019, 8:32:19 AM12/20/19
to v8-users
Some extra context, here is how the test program is being compiled:  g++ testing.cxx -I v8 -I v8/include -lv8_monolith -Lv8/out.gn/x64.release.sample/obj/ -pthread -std=c++0x -ggdb -o testing

Jakob Kummerow

unread,
Dec 20, 2019, 8:35:13 AM12/20/19
to v8-users
Does this happen outside of Valgrind too? Looks like the address in question was mmap'ed, so yeah, it's "not stack'd, malloc'd or (recently) free'd", but that doesn't mean it's invalid.


On Fri, Dec 20, 2019 at 2:32 PM Tom Hanks <tommy...@gmail.com> wrote:
Some extra context, here is how the test program is being compiled:  g++ testing.cxx -I v8 -I v8/include -lv8_monolith -Lv8/out.gn/x64.release.sample/obj/ -pthread -std=c++0x -ggdb -o testing

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/15f5df56-59b7-4560-8abf-9807653c3bfe%40googlegroups.com.

Tom Hanks

unread,
Dec 20, 2019, 9:19:22 AM12/20/19
to v8-users
Hi Jakob thanks for the reply. 

Yes this issue occurs outside of Valgrind as well. 

When I execute the test program from the command line the output is:

"2489.824"
Segmentation fault (core dumped)

When I use gdb:

(gdb) run
Starting program: /home/tom/projects/v8_workspace/testing
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffffe480700 (LWP 30026)]
[New Thread 0x7ffffdc70700 (LWP 30027)]
[New Thread 0x7ffffd460700 (LWP 30028)]
[New Thread 0x7ffffcc50700 (LWP 30029)]
[New Thread 0x7ffffc440700 (LWP 30030)]
[New Thread 0x7ffffbc30700 (LWP 30031)]
[New Thread 0x7ffffb420700 (LWP 30032)]
[New Thread 0x7ffffac10700 (LWP 30033)]
"2489.824"
[Thread 0x7ffffe480700 (LWP 30026) exited]
[Thread 0x7ffffdc70700 (LWP 30027) exited]
[Thread 0x7ffffd460700 (LWP 30028) exited]
[Thread 0x7ffffcc50700 (LWP 30029) exited]
[Thread 0x7ffffc440700 (LWP 30030) exited]
[Thread 0x7ffffbc30700 (LWP 30031) exited]
[Thread 0x7ffffb420700 (LWP 30032) exited]
[Thread 0x7ffffac10700 (LWP 30033) exited]

Thread 1 "testing" received signal SIGSEGV, Segmentation fault.
0x00000000080ef3c6 in v8::Isolate::Dispose() () 

On Friday, December 20, 2019 at 8:35:13 AM UTC-5, Jakob Kummerow wrote:
Does this happen outside of Valgrind too? Looks like the address in question was mmap'ed, so yeah, it's "not stack'd, malloc'd or (recently) free'd", but that doesn't mean it's invalid.


On Fri, Dec 20, 2019 at 2:32 PM Tom Hanks <tommy...@gmail.com> wrote:
Some extra context, here is how the test program is being compiled:  g++ testing.cxx -I v8 -I v8/include -lv8_monolith -Lv8/out.gn/x64.release.sample/obj/ -pthread -std=c++0x -ggdb -o testing

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-u...@googlegroups.com.

Caitlin Potter

unread,
Dec 20, 2019, 9:42:57 AM12/20/19
to v8-u...@googlegroups.com
Manually invoking the destructor )(`  v8.~_V8();`) is shady, and probably the cause of the problem. It looks like a UAF when the Isolate destructor is called naturally at the end of the block. I’m not sure why it worked in earlier versions, though.

Sent from my iPhone
On Dec 20, 2019, at 8:13 AM, Tom Hanks <tommy...@gmail.com> wrote:

  v8.~_V8();
Reply all
Reply to author
Forward
0 new messages