Bug 5727 - Next command crashes
Summary: Next command crashes
Status: NEW
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks: 5719
  Show dependency treegraph
 
Reported: 2008-02-04 18:08 UTC by Sami Wagiaalla
Modified: 2008-02-04 18:08 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Wagiaalla 2008-02-04 18:08:43 UTC
run fhpd like this
./frysk/bindir/fhpd ./frysk/pkglibdir/funit-addresses
break main
run
next
next

you either get a crash or next doesnt return and a where causes a crash.


[swagiaal@toner frysk-core]$ ./frysk/bindir/fhpd ./frysk/pkglibdir/funit-addresses
Loaded executable file:
/notnfs/swagiaal/frysks/frysk/frysk-core/frysk/pkglibdir/funit-addresses
(fhpd) break main
breakpoint 0 deferred
(fhpd) run
Attached to process 17235
starting/running with this command:
/notnfs/swagiaal/frysks/frysk/frysk-core/frysk/pkglibdir/funit-addresses 
Running process 17235
(fhpd) Breakpoint 0 main
list
[0.0]
    67   char* string = "hello world";
    68   char* char_ptr = NULL;
    69   int* int_ptr = NULL;
    70   char* ptrStrings[] = {"zero", "one", "two", "three"};
    71   int** dynamicTwoD = NULL;
    72   int*  dynamicOneD = NULL;
    73   
    74   int main(int argc, char* argv[])
    75   {
    76     static int static_int = 22;
->  77     volatile int volatile_int = 33;
    78     register int reg = 5;                                         
    79     int i, k;                              
    80     
    81     // Dynamically allocated two d array [5][3]
    82     dynamicTwoD =  malloc (sizeof (int*) * 5);
    83     for (i=0; i<5; i++)
    84        dynamicTwoD[i] = malloc (sizeof(int) * 3);
    85     // Fill with value 9
    86     for (i=0; i<5; i++)
(fhpd) next
Task stopped at line 82 in file
/to/scratch/swagiaal/frysks/frysk/frysk-core/frysk/pkglibdir/funit-addresses.c
(fhpd) next
Exception in thread "Thread-1" java.lang.NullPointerException
   at frysk.stepping.StepOverTestState.handleUpdate(fhpd)
   at frysk.stepping.TaskStepEngine.handleUpdate(fhpd)
   at frysk.stepping.SteppingEngine$SteppingObserver.updateExecuted(fhpd)
   at frysk.proc.live.LinuxPtraceTask.notifyInstruction(fhpd)
   at frysk.proc.live.LinuxPtraceTaskState$Stepping.handleTrappedEvent(fhpd)
   at frysk.proc.live.LinuxPtraceTaskState$Stepping.handleStoppedEvent(fhpd)
   at frysk.proc.live.LinuxPtraceTask.processStoppedEvent(fhpd)
   at frysk.proc.live.LinuxWaitBuilder.stopped(fhpd)
   at frysk.sys.Wait.wait(fhpd)
   at frysk.sys.Wait.waitAll(fhpd)
   at frysk.event.WaitEventLoop.block(fhpd)
   at frysk.event.EventLoop.runEventLoop(fhpd)
   at frysk.event.EventLoop.run(fhpd)