Skip to content

The exports returned from create_exports contains duplicate keys #5210

@echeese

Description

@echeese

I noticed that the object returned from the asm part contains duplicate keys. Here's an example from a simple hello world. The code that produces this object is in create_exports in emscripten.py but the actual bug may be further up the chain, passing in these exports twice.

Details
return {
	_malloc: _malloc,
	getTempRet0: getTempRet0,
	_free: _free,
	runPostSets: runPostSets,
	setTempRet0: setTempRet0,
	establishStackSpace: establishStackSpace,
	stackSave: stackSave,
	_memset: _memset,
	_sbrk: _sbrk,
	_emscripten_get_global_libc: _emscripten_get_global_libc,
	_memcpy: _memcpy,
	stackAlloc: stackAlloc,
	setThrew: setThrew,
	_fflush: _fflush,
	stackRestore: stackRestore,
	___errno_location: ___errno_location,
	stackAlloc: stackAlloc,
	stackSave: stackSave,
	stackRestore: stackRestore,
	establishStackSpace: establishStackSpace,
	setThrew: setThrew,
	setTempRet0: setTempRet0,
	getTempRet0: getTempRet0,
	dynCall_ii: dynCall_ii,
	dynCall_iiii: dynCall_iiii
}

stackAlloc, stackSave, stackRestore, establishStackSpace, setThrew, setTempRet0 and getTempRet0 are all contained twice in the object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions