[M3devel] stubgen problem with m3-tools\m3tk\src\toolmisc\M3Error.m3 line 214
Rodney M. Bates
rodney_bates at lcwb.coop
Mon May 16 14:52:19 CEST 2011
On 05/15/2011 12:23 PM, Mika Nystrom wrote:
> Stupid question:
>
> you did "make clean" (or equivalent) first, right?
>
> I've noticed CM3 is pretty bad about detecting changes (at least compared
> to PM3, which is my basis for all Modula-3 comparisons) and can easily
> make corrupted binaries if you change things and rely on incremental
> compilation---at least. if an interface has changed, which I suppose
> extends to opaque information too.
>
> BTW, I have reviewing the LONGINT/m3tk change and Jay's -pthread change
> on my todo list. CM3 just has been pushed down a bit for a while, hope
> to get to them soon, not ignoring you guys.
>
> Looks to me like something is forgetting to call M3Error.SetCu. Not
> code I've ever gone near...
Yes, I just found this and checked in a fix in the head. This was a long-
standing bug, but was uncovered by my recent change. There is still more
to investigate here:
- It looks like M3CLex.ReadNumericLiteral is not putting the 'L' into the literal.
- It looks like M3CLex.ReadHexDigits won't recognize the 'L' at all, for a based literal.
- It looks like somewhere even "0" is getting typed as Longint_literal.
As I remember, later processing of LONGINT literals will tolerate the trailing 'L'.
>
> Mika
>
> "Rodney M. Bates" writes:
>> Hmm, I checked in a change to the head on 2011-4-26 that could lie right on
>> this backtrace. It is in M3CExpValue.Eval, and contains a call on M3Error.Rep
>> ort.
>> There are several other calls in M3CExpValue.Eval to M3Error.Report, not invol
>> ving
>> my change. Simple proportioning between hex displacements and source line cou
>> nts
>> suggests it is the call in the change.
>>
>> But it is hard to image how my change could do anything but reduce the set of
>> cases where this call is executed, and any such cases remaining sould have bee
>> n
>> with the same values of all variables, compared to before.
>>
>> Moreover, this or any of the calls in Eval on Report would have been producing
>> error messages before the change. I presume there were no such error messages
>> formerly?
>>
>> Are there any LONGINT literals in the code stubgen is being run on? The chang
>> e
>> only weakens an overzealous error check for them.
>>
>> On 05/14/2011 10:57 PM, Coleburn, Randy wrote:
>>> I am seeing a new error when building on Windows 2000, XP, and 7.
>>>
>>> The error affects at least the following packages:
>>>
>>> ·zeus
>>>
>>> ·obliqrt
>>>
>>> ·obliqparse
>>>
>>> ·juno-app
>>>
>>> The problem is manifested when running the stub generator (stubgen). In all
>> cases it reports a runtime error, attempt to reference an illegal memory locat
>> ion, and the file and line reference is always to line #*214* in *m3-tools\m3t
>> k\src\toolmisc\M3Error.m3*
>>>
>>> I suspect some recent change is the culprit.
>>>
>>> Here is an example of the error when building juno-app:
>>>
>>> C:\cm3\bin\stubgen -v1 -sno RemoteView.T -T.M3IMPTAB
>>>
>>> ***
>>>
>>> *** runtime error:
>>>
>>> *** Attempt to reference an illegal memory location.
>>>
>>> *** file "..\src\toolmisc\M3Error.m3", line 214
>>>
>>> ***
>>>
>>> Stack trace:
>>>
>>> FP PC Procedure
>>>
>>> --------- --------- -------------------------------
>>>
>>> 0x37f208 0xdd496c CarefulNodeLookup + 0x1e in ..\src\toolmisc\M3Error.m3
>>>
>>> 0x37f26c 0xdd4401 RecordError + 0x2e8 in ..\src\toolmisc\M3Error.m3
>>>
>>> 0x37f298 0xdd4026 Report + 0x23 in ..\src\toolmisc\M3Error.m3
>>>
>>> 0x37f308 0xe46703 Eval + 0x220 in ..\src\sem\M3CExpValue.m3
>>>
>>> 0x37f358 0xe48773 Set + 0x672 in ..\src\sem\M3CExpValue.m3
>>>
>>> 0x37f380 0xda645b DoVisit + 0x121 in ..\src\gast\ASTWalk.m3
>>>
>>> 0x37f3a4 0xe381de Range + 0x85 in ..\src\ast\M3AST_AS_Walk.m3
>>>
>>> 0x37f3c8 0xda63e8 DoVisit + 0xae in ..\src\gast\ASTWalk.m3
>>>
>>> 0x37f3ec 0xe36a81 Subrange_type + 0x85 in ..\src\ast\M3AST_AS_Walk.m3
>>>
>>> 0x37f410 0xda63e8 DoVisit + 0xae in ..\src\gast\ASTWalk.m3
>>>
>>> ......... ......... ... more frames ...
>>>
>>> "C:\cm3\pkg\netobj\src\netobj.tmpl", line 37: quake runtime error: exit 2147
>> 483647: C:\cm3\bin\stubgen -v1 -sno RemoteView.T -T.M3IMPTAB
>>>
>>> --procedure-- -line- -file---
>>>
>>> exec --<builtin>
>>>
>>> _v_netobj 37 C:\cm3\pkg\netobj\src\netobj.tmpl
>>>
>>> netobjv1 44 C:\cm3\pkg\netobj\src\netobj.tmpl
>>>
>>> netobj 64 C:\cm3\pkg\netobj\src\netobj.tmpl
>>>
>>> include_dir 105 C:\cm3\Sandbox\m3-ui\juno-2\juno-app\src\m3makefile
>>>
>>> 4 C:\cm3\Sandbox\m3-ui\juno-2\juno-app\NT386\m3make.args
>>>
>>> Fatal Error: package build failed
>>>
>>> WARNING: Encountered an error when processing package "m3-ui\juno-2\juno-app
>> " for "-build".
>>>
>>> Regards,
>>>
>>> Randy Coleburn
>>>
More information about the M3devel
mailing list