Skip to content

Promote float varargs to double#584

Merged
twall merged 2 commits intojava-native-access:masterfrom
marco2357:master
Jan 31, 2016
Merged

Promote float varargs to double#584
twall merged 2 commits intojava-native-access:masterfrom
marco2357:master

Conversation

@marco2357
Copy link
Copy Markdown
Contributor

As discussed on #463

@twall
Copy link
Copy Markdown
Contributor

twall commented Jan 25, 2016

Please add a note to CHANGES.md

@marco2357
Copy link
Copy Markdown
Contributor Author

Done. Also extended the test a bit to make it clearer.

twall added a commit that referenced this pull request Jan 31, 2016
Promote float varargs to double
@twall twall merged commit a31715d into java-native-access:master Jan 31, 2016
@twall
Copy link
Copy Markdown
Contributor

twall commented Jan 31, 2016

This test fails on the ARM target (raspberry Pi)

On Jan 26, 2016, at 6:33 AM, marco2357 [email protected] wrote:

Done. Also extended the test a bit to make it clearer.


Reply to this email directly or view it on GitHub.

@marco2357
Copy link
Copy Markdown
Contributor Author

Why didn't this fail when the PR was tested? Is a different testsuite executed for PRs and after a merge?

Anyway, this doesn't seem to be a new bug my patch introduced but a bug that wasn't known (tested) before: passing float and double through varargs. I added a test each:

  1. passing double: nothing special happening, just wasn't tested, always worked in JNA
  2. passing float: needs to be promoted to double (also on ARM afaics), my patch implemented that
    Since both are failing I assume there's a basic problem. Maybe a libffi bug? Or the rasberry Pi doesn't support this and the test needs to be disabled for this target?
    How to proceed best? I don't have access to a raspberry Pi.

@twall
Copy link
Copy Markdown
Contributor

twall commented Feb 1, 2016

It’s not a bug in your code, it’s an existing bug exposed by the tests you added (that’s a good thing).

We have platform-specific tests run on merge into master (and PRs on the main project), these run on linux, mac, and raspberry Pi. Other platforms get run ad hoc before release.

I’ve put up a PR to address the ARM issue - it actually uses a different ABI when using varargs.

On Feb 1, 2016, at 8:15 AM, marco2357 [email protected] wrote:

Why didn't this fail when the PR was tested? Is a different testsuite executed for PRs and after a merge?

Anyway, this doesn't seem to be a new bug my patch introduced but a bug that wasn't known (tested) before: passing float and double through varargs. I added a test each:

  1. passing double: nothing special happening, just wasn't tested, always worked in JNA
  2. passing float: needs to be promoted to double (also on ARM afaics), my patch implemented that
    Since both are failing I assume there's a basic problem. Maybe a libffi bug? Or the rasberry Pi doesn't support this and the test needs to be disabled for this target?
    How to proceed best? I don't have access to a raspberry Pi.


Reply to this email directly or view it on GitHub.

mstyura pushed a commit to mstyura/jna that referenced this pull request Sep 9, 2024
Motivation:

There was a new maven release

Modifications:

Upgrade to 3.9.4

Result:

Use latest maven release via maven wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants