Opened on 05/06/2017 at 08:33:56 AM

Closed on 05/08/2017 at 12:38:13 PM

#5216 closed change (fixed)

[emscripten] Use a more reliable way of retrieving mangled function name

Reported by: trev Assignee: trev
Priority: P2 Milestone:
Module: Core Keywords:
Cc: Blocked By:
Blocking: #4122, #5137 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



For bindings generation, we are currently using a huge hack in order to turn a function pointer into a function name. We call the function in such a way that it will crash, then extract the name from the exception stack trace. This doesn't work with a function I want to expose in #5137 because it doesn't take any parameters and doesn't use stack.

What to change

Emscripten allows using libraries implemented in JavaScript, and the code of these libraries can run within the asm.js module. This means that it can access the function tables directly, without any hacks. While this approach still relies on some implementation details, it should be way more reliable.

Attachments (0)

Change History (3)

comment:1 Changed on 05/06/2017 at 08:37:55 AM by trev

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed on 05/08/2017 at 12:37:21 PM by abpbot

A commit referencing this issue has landed:
Issue 5216 - [emscripten Use a more reliable way of retrieving mangled function name]

comment:3 Changed on 05/08/2017 at 12:38:13 PM by trev

  • Resolution set to fixed
  • Status changed from reviewing to closed

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from trev.
Note: See TracTickets for help on using tickets.