Closed Bug 831459 Opened 7 years ago Closed 7 years ago

Crash in JS::EnterAssertNoGCScope when profiling JS in debug build

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: Irving, Assigned: Irving)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #822831 +++
Still crashing in a trunk build with both debug and profiling enabled, but down one level farther in the stack. The patch in bug 822831 changed the signature of SPSProfiler::ipToPC() so that it didn't take an UnrootedScript, but it turns out ipToPC calls JMChunkInfo::convert(UnrootedScript...)

How painful would it be to remove the automatic RawScript -> UnrootedScript coercion?

Thread 2 Crashed:: SamplerThread
0   XUL                           	0x00000001047d9680 JS::EnterAssertNoGCScope() + 16
1   XUL                           	0x000000010481d8a1 js::Unrooted<JSScript*>::Unrooted(JSScript* const&) + 113
2   XUL                           	0x000000010481d81d js::Unrooted<JSScript*>::Unrooted(JSScript* const&) + 29
3   XUL                           	0x0000000104baf2bd js::SPSProfiler::ipToPC(JSScript*, unsigned long) + 365
4   XUL                           	0x000000010489eec7 js::ProfilingGetPC(JSRuntime*, JSScript*, void*) + 55
5   XUL                           	0x00000001031550a1 _ZL15addProfileEntryRV10StackEntryR13ThreadProfileP12ProfileStackPv + 289 (TableTicker.cpp:750)
6   XUL                           	0x0000000103154e29 TableTicker::doBacktrace(ThreadProfile&, TickSample*) + 713 (TableTicker.cpp:875)
7   XUL                           	0x000000010315530b TableTicker::Tick(TickSample*) + 347 (TableTicker.cpp:950)
8   XUL                           	0x000000010315298b SamplerThread::SampleContext(Sampler*) + 299 (platform-macos.cc:275)
9   XUL                           	0x0000000103152821 SamplerThread::Run() + 81 (platform-macos.cc:228)
10  XUL                           	0x0000000103151f6f _ZL11ThreadEntryPv + 159 (platform-macos.cc:136)
11  libsystem_c.dylib             	0x00007fff883ab8bf _pthread_start + 335
12  libsystem_c.dylib             	0x00007fff883aeb75 thread_start + 13
Comment on attachment 703000 [details] [diff] [review]
Don't use UnrootedScript in JMChunkInfo::convert()

Review of attachment 703000 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/vm/SPSProfiler.cpp
@@ +253,5 @@
>      return NULL;
>  }
>  
> +// Use RawScript instead of UnrootedScript because this may be called from a
> +// signal handler

Please end the sentence with a period.
Attachment #703000 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/mozilla-central/rev/07f778300689
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.