Skip to content

Commit 0a82afd

Browse files
jcphillstwhite91
authored andcommitted
Revert CmiAbort segfaults in production builds (#2715)
Partial revert of 8c85a3d, which had set Cmi_truecrash=1 whenever CmiNumNodes()<=32. This would cause users to see a segfault when CmiAbort() was called due to input errors, safety checks, etc., which they would interpret as a bug in the application. Now builds with CMK_OPTIMIZE=1 will only segfault in CmiAbort() if ++debug or +truecrash are specified by the user on the command line at run time.
1 parent a2182a9 commit 0a82afd

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/arch/mpi/machine.C

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,8 +1463,8 @@ void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID) {
14631463
Cmi_truecrash = 1;
14641464
#endif
14651465
int debug = CmiGetArgFlag(largv,"++debug");
1466-
if (CmiGetArgFlagDesc(*argv,"+truecrash","Do not install signal handlers") || debug ||
1467-
CmiNumNodes()<=32) Cmi_truecrash = 1;
1466+
if (CmiGetArgFlagDesc(*argv,"+truecrash","Do not install signal handlers") ||
1467+
debug ) Cmi_truecrash = 1;
14681468
int debug_no_pause = CmiGetArgFlag(largv,"++debug-no-pause");
14691469
if (debug || debug_no_pause) { /*Pause so user has a chance to start and attach debugger*/
14701470
#if CMK_HAS_GETPID

src/arch/netlrts/machine.C

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,8 +2159,7 @@ void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID)
21592159
Cmi_truecrash = 1;
21602160
#endif
21612161
if (CmiGetArgFlagDesc(*argv,"+truecrash","Do not install signal handlers") ||
2162-
CmiGetArgFlagDesc(*argv,"++debug",NULL /*meaning: don't show this*/) ||
2163-
CmiNumNodes()<=32) Cmi_truecrash = 1;
2162+
CmiGetArgFlagDesc(*argv,"++debug",NULL /*meaning: don't show this*/) ) Cmi_truecrash = 1;
21642163
/* netpoll disable signal */
21652164
if (CmiGetArgFlagDesc(*argv,"+netpoll","Do not use SIGIO--poll instead")) Cmi_netpoll = 1;
21662165
if (CmiGetArgFlagDesc(*argv,"+netint","Use SIGIO")) Cmi_netpoll = 0;

src/arch/verbs/machine.C

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,8 +2010,7 @@ void LrtsInit(int *argc, char ***argv, int *numNodes, int *myNodeID)
20102010
Cmi_truecrash = 1;
20112011
#endif
20122012
if (CmiGetArgFlagDesc(*argv,"+truecrash","Do not install signal handlers") ||
2013-
CmiGetArgFlagDesc(*argv,"++debug",NULL /*meaning: don't show this*/) ||
2014-
CmiNumNodes()<=32) Cmi_truecrash = 1;
2013+
CmiGetArgFlagDesc(*argv,"++debug",NULL /*meaning: don't show this*/) ) Cmi_truecrash = 1;
20152014
/* netpoll disable signal */
20162015
if (CmiGetArgFlagDesc(*argv,"+netpoll","Do not use SIGIO--poll instead")) Cmi_netpoll = 1;
20172016
if (CmiGetArgFlagDesc(*argv,"+netint","Use SIGIO")) Cmi_netpoll = 0;

0 commit comments

Comments
 (0)