svadev AT lists.siebelschool.illinois.edu
Subject: Svadev mailing list
List archive
- From: John Criswell <criswell AT illinois.edu>
- To: svadev AT cs.uiuc.edu
- Subject: Re: [svadev] safecode: infinite error loop
- Date: Mon, 29 Aug 2011 11:02:23 -0500
- List-archive: <http://lists.cs.uiuc.edu/pipermail/svadev>
- List-id: <svadev.cs.uiuc.edu>
- Organization: University of Illinois
On 8/29/11 10:52 AM, Will Dietz wrote:
It's my understanding that SAFECode makes no guarantees about the
state of the program after an error. After all, how do you continue
execution of a program that contains illegal operations? Not just
aborting the program is something we do to be nice :).
That said in your particular use-case here's what's happening:
SAFECode detects the load/store error before it happens, this is the
first error. Then SAFECode returns to the code to execute the next
instruction...which is the load/store that we already know is invalid.
From there we just spin: segfault fires the signal handler which
reports the error (not sure why it's categorized the way it is,
perhaps John can comment), and in good signal handler fashion returns
to the instruction we were executing when the signal was fired...
which is the same instruction that segfaulted... and the signal
handler is called.... and so on.
It's also because I disabled the cut-off of 20 error reports in runtime/DebugRuntime/Report.cpp. You can modify that to re-enable the limit.
I disabled it earlier this month because I thought it would make sense for the debugging tool to keep reporting errors. However, perhaps we should just make the limit higher (maybe 50-100 error reports) or make the signal handler terminate the program since it knows that recovery is not possible.
-- John T.
Hope this helps!
~Will
On Sun, Aug 28, 2011 at 10:16 PM, Matthew
Wala<wala1 AT illinois.edu>
wrote:
Hi everyone:_______________________________________________
The most recent version of SAFECode is giving me trouble with very
simple test cases.
For instance, the program
int main()
{
int i[100];
i[101] = 10;
return 0;
}
when instrumented and run results in the following output:
SAFECode:Violation Type 0x6 when accessing 0x617934 at IP=0x401fc0
=======+++++++ SAFECODE RUNTIME ALERT +++++++=======
= Error type : Load/Store Error
= Faulting pointer : 0x617934
= Program counter : 0x401fc0
= Fault PC Source : main:6
=
= Object allocated at PC : 0x401ef4
= Allocated in Source File : main:1
= Object allocation sequence number : 1
= Object start : 0x6177a0
= Object length : 0x64
SAFECode: Fault!
SAFECode:Violation Type 0x9 when accessing 0xc0000001 at IP=0x411b64
=======+++++++ SAFECODE RUNTIME ALERT +++++++=======
= Error type : Uninitialized/NULL Pointer
Error
= Faulting pointer : 0xc0000001
= Program counter : 0x411b64
= Fault PC Source :<unknown>:0
SAFECode: Fault!
SAFECode:Violation Type 0x9 when accessing 0xc0000001 at IP=0x411b64
=======+++++++ SAFECODE RUNTIME ALERT +++++++=======
= Error type : Uninitialized/NULL Pointer
Error
= Faulting pointer : 0xc0000001
= Program counter : 0x411b64
= Fault PC Source :<unknown>:0
SAFECode: Fault!
SAFECode:Violation Type 0x9 when accessing 0xc0000001 at IP=0x411b64
The last Unitialized / NULL Pointer Error statement is repeated without end.
Is there an explanation for this behavior and how can I get it to work
properly?
Thanks,
Matt
_______________________________________________
svadev mailing list
svadev AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/svadev
svadev mailing list
svadev AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/svadev
- [svadev] safecode: infinite error loop, Matthew Wala, 08/28/2011
- Re: [svadev] safecode: infinite error loop, Will Dietz, 08/29/2011
- Re: [svadev] safecode: infinite error loop, John Criswell, 08/29/2011
- Re: [svadev] safecode: infinite error loop, Will Dietz, 08/29/2011
- Re: [svadev] safecode: infinite error loop, John Criswell, 08/29/2011
- Re: [svadev] safecode: infinite error loop, Will Dietz, 08/29/2011
Archive powered by MHonArc 2.6.16.