Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4546478

Enabling a watchpoint can kill following NotifyFramePops

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0_02
    • 1.4.0
    • vm-legacy
    • None
    • 02
    • sparc
    • solaris_7

        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);
        > }
        >

              mchung Mandy Chung (Inactive)
              jjh James Holmlund (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: