Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: X10 1.7.2 - C++ hosted
-
Fix Version/s: X10 1.7.3
-
Component/s: Native X10: Compiler Codegen
-
Labels:None
-
Environment:All supported x10/c++ backend platforms
-
Number of attachments :
Description
It appears that the x10/c++ compiler is not setting properly the program exit code while generating xrx pre-compiled classes –
because of this, both execution failures and successes are simply returning 0s and consequently the regression script is failing to detect proper execution from an improper one.
Please find all the relevant code at the end of this message.
x10lib/harness/x10Test.x10 is setting these codes properly at the x10 application level –
46 public const PREFIX: String = "+++++ ";
+47
+48 public static def success(): void =
+52
+53 public static def failure(): void =
here is the xrx code that sets this (in src-x10/x10/lang/Runtime.x10) –
+14 public value Runtime {
+15 /**
+16 * Sleep for the specified number of milliseconds.
+17 * [IP] NOTE: Unlike Java, x10 sleep() simply exits when interrupted.
+18 * @param millis the number of milliseconds to sleep
+19 * @return true if completed normally, false if interrupted
+20 */
+21 public static def sleep(millis: long): boolean
+24
+25 public static def setExitCode(code: int): void
+28 }
where as the generated file src-cpp/gen/x10/runtime/NativeRuntime.cc is doing nothing against this –
+10 //#line 20 "/bench1/regress.cpp/x10.runtime.17/src-x10/x10/runtime/NativeRuntime.x10"
+11
+12 //#line 27 "/bench1/regress.cpp/x10.runtime.17/src-x10/x10/runtime/NativeRuntime.x10"
+13 void x10::runtime::NativeRuntime::setExitCode(x10_int code)
Issue Links
- is depended upon by
-
XTENLANG-263
Nightly tests for C++ backend
-
Activity
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | X10 1.7.3 [ 14695 ] | |
| Fix Version/s | X10 1.7.2 - C++ hosted [ 14605 ] |
| Link |
This issue is depended upon by |
| Assignee | Dave Cunningham [ spark ] | David Grove [ dgrove ] |
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Resolution | Fixed [ 1 ] | |
| Status | In Progress [ 3 ] | Closed [ 6 ] |
This isn't a compiler issue, just missing runtime implementation on the c++ side. I can fix this to let Dave C focus on c++ backend problems.