You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also removes the code block around it in emscripten.py. That's an obvious
easy win as it's a fastcomp-only function, and it's faster to remove such a
thing (when it's easily identifiable like here) rather than let future PRs remove
it line by line. Also removes the call chain to that function, also of fastcomp-
only functions (also easy wins, and necessary due to flake8).
See #11860
Copy file name to clipboardExpand all lines: site/source/docs/porting/Debugging.rst
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -251,14 +251,11 @@ In order to debug these sorts of issues:
251
251
- Compile with ``-Werror``. This turns warnings into errors, which can be useful as some cases of undefined behavior would otherwise show warnings.
252
252
- Use ``-s ASSERTIONS=2`` to get some useful information about the function pointer being called, and its type.
253
253
- Look at the browser stack trace to see where the error occurs and which function should have been called.
254
-
- Build with :ref:`SAFE_HEAP=1 <debugging-SAFE-HEAP>` and function pointer aliasing disabled (``ALIASING_FUNCTION_POINTERS=0``). This should make it impossible for a function pointer to be called with the wrong type without raising an error: ``-s SAFE_HEAP=1 -s ALIASING_FUNCTION_POINTERS=0``
255
-
254
+
- Build with :ref:`SAFE_HEAP=1 <debugging-SAFE-HEAP>`.
255
+
- :ref:`Sanitizers` can help here, in particular UBSan.
256
256
257
257
Another function pointer issue is when the wrong function is called. :ref:`SAFE_HEAP=1 <debugging-SAFE-HEAP>` can help with this as it detects some possible errors with function table accesses.
258
258
259
-
``ALIASING_FUNCTION_POINTERS=0`` is also useful because it ensures that calls to function pointer addresses in the wrong table result in clear errors. Without this setting such calls just execute whatever function is at the address, which can be much harder to debug.
0 commit comments