Closed Bug 1659905 Opened 1 year ago Closed 1 year ago

CTypes variadic support is incomplete

Categories

(Core :: js-ctypes, defect)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

Bug 554790 implemented variadic ctypes functions, but they're not hooked up in a way that actually works on all platforms, most notably, on Apple Silicon mac. At the very minimum, ffi_prep_cif_var should be used for these functions instead of ffi_prep_cif, but isn't.

Incidentally, test_jsctypes.js fails on Apple Silicon mac with: FAIL run_variadic_tests - [run_variadic_tests : 3875] -2062320572 == 6

Blocks: 1659904

It never told libffi what the variadic arguments were.
Also fix the ctypes declaration of test_vector_add_va_cdecl in the unit test,
which is actually wrong, but the test still passed for some reason.

Blocks: 1659906
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/5d5588494bec
Fix ctypes variadic support. r=jorendorff
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.