Skip to content

Commit

Permalink
Updated BLBackTrace::handler to print out a message for SIGILL
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson452 committed Jul 27, 2023
1 parent a169a9b commit 65d34c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Docs/sphinx_documentation/source/Debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use of uninitialized values, AMReX also initializes ``FArrayBox``\ s in
``MulitFab``\ s and arrays allocated by ``bl_allocate`` to signaling NaNs when it is compiled
with ``TEST=TRUE`` or ``DEBUG=TRUE`` in GNU make, or with ``-DCMAKE_BUILD_TYPE=Debug`` in CMake.
One can also control the setting for ``FArrayBox`` using the runtime parameter, ``fab.init_snan``.
Note for Macs, M1 and M2 chips using Arm64 architecture are not able to trap division by zero.
Note for Macs, M1 and M2 chips using Arm64 architecture are not able to trap division by zero.

One can get more information than the backtrace of the call stack by
instrumenting the code. Here is an example.
Expand Down
3 changes: 3 additions & 0 deletions Src/Base/AMReX_BLBackTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ BLBackTrace::handler(int s)
case SIGFPE:
amrex::ErrorStream() << "Erroneous arithmetic operation\n";
break;
case SIGILL:
amrex::ErrorStream() << "SIGILL Invalid, privileged, or ill-formed instruction\n";
break;
case SIGTERM:
amrex::ErrorStream() << "SIGTERM\n";
break;
Expand Down

0 comments on commit 65d34c7

Please sign in to comment.