[M3devel] assertion failure in atomics

Tony Hosking hosking at cs.purdue.edu
Thu Feb 11 17:54:59 CET 2010


I figured we'd shake some of these problems out fairly soon.

I need to get the TInt/TWord stuff checked in before I move on this.

Antony Hosking | Associate Professor | Computer Science | Purdue University
305 N. University Street | West Lafayette | IN 47907 | USA
Office +1 765 494 6001 | Mobile +1 765 427 5484




On 11 Feb 2010, at 08:23, Jay K wrote:

> Tony if you don't have enough to do already:
>  
> VAR
>     <*NOWARN*>a := 1;
>     <*NOWARN*>b := 2;
>     <*NOWARN*>c := 3;
>     <*NOWARN*>d := 4;
>     <*NOWARN*>A := 5L;
>     <*NOWARN*>B := 6L;
>     <*NOWARN*>C := 7L;
>     <*NOWARN*>D := 8L;
>     bool:BOOLEAN;
> 
> PROCEDURE Test_AtomicInteger_CompareSwap() =
> BEGIN
>     bool := AtomicInteger.CompareSwap(a, b, c);
> END Test_AtomicInteger_CompareSwap;
> 
> 
> C:\dev2\cm3.2\m3-sys\m3tests\src\p2\p226>cm3
> --- building in NT386 ---
> new source -> compiling Main.m3
> "..\Main.m3", line 83: incompatible types (var)
> 
> ***
> *** runtime error:
> ***    An array subscript was out of range.
> ***    file "..\NT386\CompareSwapInt.m3 => ..\src\builtinAtomic\CompareSwap.mg",
>  line 19
> ***
> Stack trace:
>    FP         PC      Procedure
> ---------  ---------  -------------------------------
>  0x12f3c4   0x597b9a  Check + 0x19a in ..\NT386\CompareSwapInt.m3 => ..\src\buil
> tinAtomic\CompareSwap.mg
>  0x12f410   0x5cd6c6  Check + 0x762 in ..\src\exprs\CallExpr.m3
>  0x12f434   0x5bed4b  TypeCheck + 0x65 in ..\src\exprs\Expr.m3
>  0x12f478   0x5c0570  CheckMethod + 0xd5 in ..\src\stmts\AssignStmt.m3
>  0x12f498   0x5320e7  TypeCheck + 0x48 in ..\src\stmts\Stmt.m3
>  0x12f4c4   0x531400  Check + 0x265 in ..\src\stmts\BlockStmt.m3
>  0x12f4e4   0x5320e7  TypeCheck + 0x48 in ..\src\stmts\Stmt.m3
>  0x12f554   0x4e73c4  CheckBody + 0x67d in ..\src\values\Procedure.m3
>  0x12f580   0x4d0cce  TypeCheck + 0x16e in ..\src\misc\Scope.m3
>  0x12f5c4   0x4c159b  TypeCheck + 0x305 in ..\src\values\Module.m3
> .........  .........  ... more frames ...
>  
>  
> 1) The test is in error, wrong type on one of the params.
> 2) This could be specific to using m3back.
> 3) I'll poke around more.
> 4) Too bad we don't get line numbers in the stacks.
>  
>  - Jay
>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20100211/e430ce12/attachment-0002.html>


More information about the M3devel mailing list