Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2049659 | 1.4.1 | Mandy Chung | P4 | Closed | Fixed | hopper |
Ken says that this will basically only happen if the first thing
you do in a debug session is enable a watchpoint.
John Rose wrote:
>
> Ken found a bug in my C2 FullSpeedJVMDI workspace.
> The JVMDIThreadState::_cur_stack_depth isn't getting
> maintained after field watchpoints are turned on
> (in the nsk/jvmdi/events/fieldacc001 unit test).
> The bug manifests as an assert getting thrown:
>
> assert(frame_number >= 0, "invalid frame number");
>
> Below is Ken's one-line fix. I'm folding it into my
> workspace for Hopper, but it also needs to go into 1.4.
>
> -- John
>
> # gnudiff -U10 jvmdi.cpp
>
> ------- jvmdi.cpp -------
> --- /tmp/sd23049 Fri Nov 30 14:58:15 2001
> +++ jvmdi.cpp Fri Nov 30 14:53:24 2001
> @@ -3505,20 +3505,21 @@
>
>
> //
> // JVM/DI field access management
> //
>
> void jvmdi::set_dynamic_enable_watchpoints(int event_type, bool enabled)
> {
> VM_ChangeFieldWatch op(event_type, enabled);
> VMThread::execute(&op);
> + recompute_method_entry_and_exit_on();
> }
>
> void jvmdi::dec_field_access_count() {
> set_dynamic_enable_watchpoints(JVMDI_EVENT_FIELD_ACCESS, false);
> }
>
you do in a debug session is enable a watchpoint.
John Rose wrote:
>
> Ken found a bug in my C2 FullSpeedJVMDI workspace.
> The JVMDIThreadState::_cur_stack_depth isn't getting
> maintained after field watchpoints are turned on
> (in the nsk/jvmdi/events/fieldacc001 unit test).
> The bug manifests as an assert getting thrown:
>
> assert(frame_number >= 0, "invalid frame number");
>
> Below is Ken's one-line fix. I'm folding it into my
> workspace for Hopper, but it also needs to go into 1.4.
>
> -- John
>
> # gnudiff -U10 jvmdi.cpp
>
> ------- jvmdi.cpp -------
> --- /tmp/sd23049 Fri Nov 30 14:58:15 2001
> +++ jvmdi.cpp Fri Nov 30 14:53:24 2001
> @@ -3505,20 +3505,21 @@
>
>
> //
> // JVM/DI field access management
> //
>
> void jvmdi::set_dynamic_enable_watchpoints(int event_type, bool enabled)
> {
> VM_ChangeFieldWatch op(event_type, enabled);
> VMThread::execute(&op);
> + recompute_method_entry_and_exit_on();
> }
>
> void jvmdi::dec_field_access_count() {
> set_dynamic_enable_watchpoints(JVMDI_EVENT_FIELD_ACCESS, false);
> }
>
- backported by
-
JDK-2049659 Enabling a watchpoint can kill following NotifyFramePops
-
- Closed
-
- relates to
-
JDK-4638168 Clean up use of recompute_method_entry_and_exit_on and stack depth counting
-
- Closed
-