@@ -100,12 +100,13 @@ void throwsAndRecoversFromStackOverflow(CompilerHelper.CompilerConfig config) th
100100 "StackOverflowApp smoke run exited with code " + smokeResult .exitCode
101101 + ". Output:\n " + smokeResult .output
102102 + smokeDiagnostics );
103- int smokeProbeCount = countOccurrences (smokeResult .output , "PROBE_CONSTANT" );
104- assertTrue (smokeProbeCount >= 2 ,
105- "StackOverflowApp smoke run should emit two probe markers. Output was:\n "
103+ assertTrue (smokeResult .output .contains ("PROBE_CONSTANT_ONE" ),
104+ "StackOverflowApp smoke run should emit PROBE_CONSTANT_ONE. Output was:\n "
105+ + smokeResult .output + smokeDiagnostics );
106+ assertTrue (smokeResult .output .contains ("PROBE_CONSTANT_TWO" ),
107+ "StackOverflowApp smoke run should emit PROBE_CONSTANT_TWO. Output was:\n "
106108 + smokeResult .output
107- + "\n Observed PROBE_CONSTANT count: " + smokeProbeCount
108- + "\n A count of 1 suggests a crash between the first and second reportConstant() calls."
109+ + "\n Missing PROBE_CONSTANT_TWO suggests a crash between the first and second print."
109110 + smokeDiagnostics );
110111
111112 ProcessResult result = runProcess (Arrays .asList (executable .toString (), "overflow" , "run" ), buildDir );
@@ -158,8 +159,9 @@ private String nativeReportSource() {
158159 " fflush(stdout);\n " +
159160 "}\n " +
160161 "void StackOverflowApp_reportConstantTwice__(CODENAME_ONE_THREAD_STATE) {\n " +
161- " printf(\" PROBE_CONSTANT\\ n\" );\n " +
162- " printf(\" PROBE_CONSTANT\\ n\" );\n " +
162+ " printf(\" PROBE_CONSTANT_ONE\\ n\" );\n " +
163+ " fflush(stdout);\n " +
164+ " printf(\" PROBE_CONSTANT_TWO\\ n\" );\n " +
163165 " fflush(stdout);\n " +
164166 "}\n " +
165167 "void StackOverflowApp_report___java_lang_String(CODENAME_ONE_THREAD_STATE, JAVA_OBJECT msg) {\n " +
0 commit comments