[M3devel] CM3 crashing

mika at async.caltech.edu mika at async.caltech.edu
Sun Jan 12 18:53:17 CET 2014


Hi m3devel,

Anyone have an idea what's going on here?

I have program that compiles with PM3 (FreeBSD4):

...
new source -> compiling ../src/Main.m3
"../src/Main.m3", line 15: warning: exception is never raised: OSError.E
"../src/Main.m3", line 15: warning: exception is never raised: Thread.Alerted
"../src/Main.m3", line 15: warning: exception is never raised: Wr.Failure

new opaque info -> recompiling HParseStd.m3
...

With CM3 at head (AMD64_LINUX (userthreads)), the following happens:

--- building in AMD64_LINUX ---

echo _PARSER_SOURCES +='"'`pwd`/../src/H.t'"' > H_t.tmpl
echo _PARSER_SOURCES +='"'`pwd`/../src/H.l'"' > H_l.tmpl
echo _PARSER_SOURCES +='"'`pwd`/../src/H.y'"' > H_y.tmpl
new source -> compiling Main.m3
"../src/Main.m3", line 104: warning: potentially unhandled exception: RTAllocator.OutOfMemory
"../src/Main.m3", line 138: warning: potentially unhandled exception: RTAllocator.OutOfMemory
"../src/Main.m3", line 15: warning: exception is never raised: OSError.E
"../src/Main.m3", line 15: warning: exception is never raised: Thread.Alerted
"../src/Main.m3", line 15: warning: exception is never raised: Wr.Failure


***
*** runtime error:
***    Attempt to reference an illegal memory location.
***    file "../src/thread/POSIX/ThreadPosix.m3", line 1073
***

Abort

(gdb) run -x
Starting program: /big/home/mika/cm3-boot2.userthreads/bin/cm3 -x
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
--- building in AMD64_LINUX ---

echo _PARSER_SOURCES +='"'`pwd`/../src/H.t'"' > H_t.tmpl
echo _PARSER_SOURCES +='"'`pwd`/../src/H.l'"' > H_l.tmpl
echo _PARSER_SOURCES +='"'`pwd`/../src/H.y'"' > H_y.tmpl
new source -> compiling Main.m3
"../src/Main.m3", line 104: warning: potentially unhandled exception: RTAllocator.OutOfMemory
"../src/Main.m3", line 138: warning: potentially unhandled exception: RTAllocator.OutOfMemory
"../src/Main.m3", line 15: warning: exception is never raised: OSError.E
"../src/Main.m3", line 15: warning: exception is never raised: Thread.Alerted
"../src/Main.m3", line 15: warning: exception is never raised: Wr.Failure

Program received signal SIGSEGV, Segmentation fault.
0x000000000072da7c in RTHooks__Concat (M3_Bd56fi_t=<error reading variable>, M3_Bd56fi_u=<error reading variable>) at ../src/text/TextCat.m3:36
36            u.get_info (RInfo);  
(gdb) where
#0  0x000000000072da7c in RTHooks__Concat (M3_Bd56fi_t=<error reading variable>, M3_Bd56fi_u=<error reading variable>) at ../src/text/TextCat.m3:36
#1  0x00000000006904d1 in M3CG_Check__PutErr (M3_CquYO2_u=<error reading variable>, M3_Bd56fi_a=<error reading variable>, M3_Bd56fi_b=<error reading variable>, M3_Bd56fi_c=<error reading variable>) at ../src/M3CG_Check.m3:190
#2  0x0000000000692133 in M3CG_Check__CheckProc (M3_CquYO2_self=<error reading variable>, M3_BgUkgw_p=<error reading variable>) at ../src/M3CG_Check.m3:513
#3  0x00000000006969e7 in M3CG_Check__load_procedure (M3_CquYO2_self=<error reading variable>, M3_BgUkgw_p=<error reading variable>) at ../src/M3CG_Check.m3:1289
#4  0x000000000051c846 in CG__Load_procedure (M3_BgUkgw_p=<error reading variable>) at ../src/misc/CG.m3:2547
#5  0x0000000000564b6d in Procedure__Load (M3_D4a7Im_t=<error reading variable>) at ../src/values/Procedure.m3:358
#6  0x000000000054f81f in Value__Load (M3_EjfEr4_t=<error reading variable>) at ../src/values/Value.m3:61
#7  0x00000000005b3451 in ProcExpr__Compile (M3_EeJ4NO_p=<error reading variable>) at ../src/exprs/ProcExpr.m3:96
#8  0x0000000000596873 in Expr__Compile (M3_ES44mX_t=<error reading variable>) at ../src/exprs/Expr.m3:145
#9  0x00000000005588db in Formal__GenProcedure (M3_DfGE7n_t=<error reading variable>, M3_ES44mX_actual=<error reading variable>, M3_ES44mX_proc=<error reading variable>) at ../src/values/Formal.m3:550
#10 0x000000000055809c in Formal__EmitArg (M3_ES44mX_proc=<error reading variable>, M3_EjfEr4_formal=<error reading variable>, M3_ES44mX_actual=<error reading variable>) at ../src/values/Formal.m3:459
#11 0x000000000054e82c in UserProc (M3_ChqBRb_ce=<error reading variable>) at ../src/types/UserProc.m3:131
#12 0x00000000005a0de2 in CallExpr (M3_ChqBRb_p=<error reading variable>) at ../src/exprs/CallExpr.m3:314
#13 0x0000000000596825 in Expr (M3_ES44mX_t=<error reading variable>) at ../src/exprs/Expr.m3:138
#14 0x0000000000557e4d in Formal__PrepArg (M3_EjfEr4_formal=<error reading variable>, M3_ES44mX_actual=<error reading variable>) at ../src/values/Formal.m3:431
#15 0x000000000054e48e in UserProc (M3_ChqBRb_ce=<error reading variable>) at ../src/types/UserProc.m3:91
#16 0x00000000005a0de2 in CallExpr (M3_ChqBRb_p=<error reading variable>) at ../src/exprs/CallExpr.m3:314
#17 0x0000000000596825 in Expr (M3_ES44mX_t=<error reading variable>) at ../src/exprs/Expr.m3:138
#18 0x00000000004f741e in Marker__EmitReturn (M3_ES44mX_expr=<error reading variable>, M3_AicXUJ_fromFinally=<error reading variable>) at ../src/misc/Marker.m3:540
#19 0x00000000005d9ed1 in ReturnStmt__Compile (M3_CnuIWR_p=<error reading variable>) at ../src/stmts/ReturnStmt.m3:55
#20 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#21 0x00000000005dfdd5 in TypeCaseStmt__CompileCaseBody (M3_BVmtE4_p=<error reading variable>, M3_CUZbO1_c=<error reading variable>, M3_CFkyBH_ref=<error reading variable>, M3_AcxOUs_case_label=<error reading variable>, 
    M3_AcxOUs_exit_label=<error reading variable>, M3_EIM114_done=<error reading variable>) at ../src/stmts/TypeCaseStmt.m3:345
#22 0x00000000005df778 in TypeCaseStmt__Compile (M3_BVmtE4_p=<error reading variable>) at ../src/stmts/TypeCaseStmt.m3:284
#23 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#24 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#25 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#26 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#27 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#28 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#29 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#30 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#31 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#32 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#33 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#34 0x00000000005d7dd9 in IfStmt__Compile (M3_EFMY1O_p=<error reading variable>) at ../src/stmts/IfStmt.m3:105
#35 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#36 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#37 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#38 0x00000000005e1822 in WithStmt__Compile (M3_BurbBt_p=<error reading variable>) at ../src/stmts/WithStmt.m3:150
#39 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#40 0x00000000005dfcfa in TypeCaseStmt__CompileCaseBody (M3_BVmtE4_p=<error reading variable>, M3_CUZbO1_c=<error reading variable>, M3_CFkyBH_ref=<error reading variable>, M3_AcxOUs_case_label=<error reading variable>, 
    M3_AcxOUs_exit_label=<error reading variable>, M3_EIM114_done=<error reading variable>) at ../src/stmts/TypeCaseStmt.m3:339
#41 0x00000000005df778 in TypeCaseStmt__Compile (M3_BVmtE4_p=<error reading variable>) at ../src/stmts/TypeCaseStmt.m3:284
#42 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#43 0x00000000005ce5f3 in BlockStmt__Compile (M3_CwhzFF_p=<error reading variable>) at ../src/stmts/BlockStmt.m3:103
#44 0x00000000005ccb57 in Stmt__Compile (M3_Bt9Ne6_t=<error reading variable>) at ../src/stmts/Stmt.m3:115
#45 0x00000000005667a9 in Procedure__GenBody (M3_D4a7Im_p=<error reading variable>) at ../src/values/Procedure.m3:577
#46 0x000000000056631d in Procedure__EmitBody (M3_CknzAQ_x=<error reading variable>) at ../src/values/Procedure.m3:541
#47 0x0000000000509703 in ProcBody__EmitBody (M3_BswZye_t=<error reading variable>) at ../src/misc/ProcBody.m3:170
#48 0x000000000050887f in ProcBody__EmitAll (M3_EN2A1V_proc_info=<error reading variable>) at ../src/misc/ProcBody.m3:69
#49 0x00000000005603d4 in Module__CompileModule (M3_DZ1mTg_t=<error reading variable>) at ../src/values/Module.m3:905
#50 0x000000000055fc79 in Module__Compile (M3_DZ1mTg_t=<error reading variable>) at ../src/values/Module.m3:837
#51 0x00000000004ec678 in M3Front__DoCompile () at ../src/misc/M3Front.m3:218
#52 0x00000000004eb7e9 in M3Front__Compile (M3_Algh87_input=<error reading variable>, M3_CT7GjM_env=<error reading variable>, M3_BySCJy_options=<error reading variable>) at ../src/misc/M3Front.m3:66
#53 0x0000000000411db9 in Builder__RunM3 (M3_Cwb8uG_s=<error reading variable>, M3_AXLf8B_u=<error reading variable>, M3_Bd56fi_object=<error reading variable>) at ../src/Builder.m3:1705
#54 0x000000000040ff74 in Builder__PushOneM3 (M3_Cwb8uG_s=<error reading variable>, M3_AXLf8B_u=<error reading variable>) at ../src/Builder.m3:1359
#55 0x000000000040f5ca in Builder__CompileM3 (M3_Cwb8uG_s=<error reading variable>, M3_AXLf8B_u=<error reading variable>) at ../src/Builder.m3:1247
#56 0x000000000040de26 in Builder__CompileOne (M3_Cwb8uG_s=<error reading variable>, M3_AXLf8B_u=<error reading variable>) at ../src/Builder.m3:1077
#57 0x000000000040d7b7 in Builder__CompileEverything (M3_Cwb8uG_s=<error reading variable>, M3_Cw4bpV_schedule=<error reading variable>) at ../src/Builder.m3:1025
#58 0x0000000000408676 in Builder__CompileUnits (M3_Bd56fi_main=<error reading variable>, M3_EEuw3X_units=<error reading variable>, M3_C1FTrk_sys_libs=<error reading variable>, M3_A2QN6Z_info_kind=<error reading variable>, 
    M3_An02H2_mach=<error reading variable>) at ../src/Builder.m3:336
#59 0x0000000000406c0b in Builder__BuildPgm (M3_Bd56fi_prog=<error reading variable>, M3_EEuw3X_units=<error reading variable>, M3_C1FTrk_sys_libs=<error reading variable>, M3_AicXUJ_shared=<error reading variable>, 
    M3_An02H2_m=<error reading variable>) at ../src/Builder.m3:28
#60 0x00000000004256f3 in M3Build__BuildProgram (M3_ABp1Zk_t=<error reading variable>, M3_DLS2Hj_nm=<error reading variable>) at ../src/M3Build.m3:1515
#61 0x000000000042553b in M3Build__DoProgram (M3_An02H2_m=<error reading variable>, M3_AcxOUs_n_args=<error reading variable>) at ../src/M3Build.m3:1491
#62 0x00000000004d01ad in QMachine__DoCall (M3_An02H2_t=<error reading variable>, M3_AcxOUs_n_args=<error reading variable>, M3_AicXUJ_isFunc=<error reading variable>, M3_AicXUJ_outer=<error reading variable>)
    at ../src/QMachine.m3:546
#63 0x00000000004cee3f in QMachine__Eval (M3_An02H2_t=<error reading variable>) at ../src/QMachine.m3:422
#64 0x00000000004d9152 in QMachine (M3_An02H2_t=<error reading variable>, M3_Bd56fi_path=<error reading variable>, M3_AicXUJ_from_code=<error reading variable>) at ../src/QMachine.m3:1773
#65 0x00000000004d8f2f in QMachine (M3_An02H2_t=<error reading variable>, M3_Bd56fi_path=<error reading variable>) at ../src/QMachine.m3:1744
#66 0x0000000000420f0d in M3Build (M3_ABp1Zk_t=<error reading variable>, M3_Bd56fi_file=<error reading variable>) at ../src/M3Build.m3:679
#67 0x0000000000422dc9 in M3Build__DoIncludeDir (M3_An02H2_m=<error reading variable>, M3_AcxOUs_n_args=<error reading variable>) at ../src/M3Build.m3:1054
#68 0x00000000004d01ad in QMachine__DoCall (M3_An02H2_t=<error reading variable>, M3_AcxOUs_n_args=<error reading variable>, M3_AicXUJ_isFunc=<error reading variable>, M3_AicXUJ_outer=<error reading variable>)
    at ../src/QMachine.m3:546
#69 0x00000000004cee3f in QMachine__Eval (M3_An02H2_t=<error reading variable>) at ../src/QMachine.m3:422
#70 0x00000000004cd167 in QMachine__Evaluate (M3_An02H2_t=<error reading variable>, M3_CYwAos_s=<error reading variable>) at ../src/QMachine.m3:165
#71 0x00000000004c3c18 in Quake__Run (M3_An02H2_m=<error reading variable>, M3_Bd56fi_source_file=<error reading variable>) at ../src/Quake.m3:19
#72 0x000000000041f10d in M3Build__Run (M3_ABp1Zk_t=<error reading variable>, M3_Bd56fi_makefile=<error reading variable>) at ../src/M3Build.m3:242
#73 0x00000000004372ed in Main__DoIt () at ../src/Main.m3:117
#74 0x0000000000437671 in Main_M3 (M3_AcxOUs_mode=<error reading variable>) at ../src/Main.m3:231
#75 0x00000000007087ed in RTLinker__RunMainBody (M3_DjPxE3_m=<error reading variable>) at ../src/runtime/common/RTLinker.m3:408
#76 0x0000000000707b78 in RTLinker__AddUnitI (M3_DjPxE3_m=<error reading variable>) at ../src/runtime/common/RTLinker.m3:115
#77 0x0000000000707c0c in RTLinker__AddUnit (M3_DjPxE5_b=<error reading variable>) at ../src/runtime/common/RTLinker.m3:124
#78 0x0000000000405b48 in main (argc=2, argv=0x7fffffffe378, envp=0x7fffffffe390) at _m3main.c:22
(gdb) 

Looks like something very basic...






More information about the M3devel mailing list