<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Type-incorrect code seems to tend to assert. But type-correct code gets through the frontend ok.<BR>
<BR>
- Jay<BR> <BR>
<HR id=stopSpelling>
From: jay.krell@cornell.edu<BR>To: hosking@cs.purdue.edu; m3devel@elegosoft.com<BR>Date: Thu, 11 Feb 2010 13:23:45 +0000<BR>Subject: [M3devel] assertion failure in atomics<BR><BR>
<STYLE>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</STYLE>
Tony if you don't have enough to do already:<BR> <BR>VAR<BR> <*NOWARN*>a := 1;<BR> <*NOWARN*>b := 2;<BR> <*NOWARN*>c := 3;<BR> <*NOWARN*>d := 4;<BR> <*NOWARN*>A := 5L;<BR> <*NOWARN*>B := 6L;<BR> <*NOWARN*>C := 7L;<BR> <*NOWARN*>D := 8L;<BR> bool:BOOLEAN;<BR><BR>PROCEDURE Test_AtomicInteger_CompareSwap() =<BR>BEGIN<BR> bool := AtomicInteger.CompareSwap(a, b, c);<BR>END Test_AtomicInteger_CompareSwap;<BR><BR><BR>C:\dev2\cm3.2\m3-sys\m3tests\src\p2\p226>cm3<BR>--- building in NT386 ---<BR>new source -> compiling Main.m3<BR>"..\Main.m3", line 83: incompatible types (var)<BR><BR>***<BR>*** runtime error:<BR>*** An array subscript was out of range.<BR>*** file "..\NT386\CompareSwapInt.m3 => ..\src\builtinAtomic\CompareSwap.mg",<BR> line 19<BR>***<BR>Stack trace:<BR> FP PC Procedure<BR>--------- --------- -------------------------------<BR> 0x12f3c4 0x597b9a Check + 0x19a in ..\NT386\CompareSwapInt.m3 => ..\src\buil<BR>tinAtomic\CompareSwap.mg<BR> 0x12f410 0x5cd6c6 Check + 0x762 in ..\src\exprs\CallExpr.m3<BR> 0x12f434 0x5bed4b TypeCheck + 0x65 in ..\src\exprs\Expr.m3<BR> 0x12f478 0x5c0570 CheckMethod + 0xd5 in ..\src\stmts\AssignStmt.m3<BR> 0x12f498 0x5320e7 TypeCheck + 0x48 in ..\src\stmts\Stmt.m3<BR> 0x12f4c4 0x531400 Check + 0x265 in ..\src\stmts\BlockStmt.m3<BR> 0x12f4e4 0x5320e7 TypeCheck + 0x48 in ..\src\stmts\Stmt.m3<BR> 0x12f554 0x4e73c4 CheckBody + 0x67d in ..\src\values\Procedure.m3<BR> 0x12f580 0x4d0cce TypeCheck + 0x16e in ..\src\misc\Scope.m3<BR> 0x12f5c4 0x4c159b TypeCheck + 0x305 in ..\src\values\Module.m3<BR>......... ......... ... more frames ...<BR> <BR> <BR>1) The test is in error, wrong type on one of the params.<BR>2) This could be specific to using m3back.<BR>3) I'll poke around more.<BR>4) Too bad we don't get line numbers in the stacks.<BR> <BR> - Jay<BR> <BR> </body>
</html>