Visitar URL original
StdCallCallback fails with message of corrupted stack · Issue #300 · java-native-access/jna · GitHub
Skip to content

StdCallCallback fails with message of corrupted stack #300

Closed

Description

@boscogh

I found out use case there StdCallCallback fails with message of corrupted stack.
It only occure with method of specific signature.
Please review my question on stackoverflow, it contains isolated testcase to 100% reproducible issue

link to the question details with source code included:
http://stackoverflow.com/questions/21039368/jna-stdcall-esp-corruption

Activity

  1. added a commit that references this issue on Jan 12, 2014
  2. twall commented on Jan 12, 2014

    @twall
    Contributor

    Take a look at branch issue-300 to see if you can tweak it to reproduce the error you're seeing.

  3. twall commented on Jan 13, 2014

    @twall
    Contributor

    9 arguments works, 11 arguments doesn't. Branch updated.

  4. twall commented on Jan 13, 2014

    @twall
    Contributor

    libffi may be calculating an incorrect stack size (actual 60, expected 56). This number is inserted into a dynamically generated trampoline, defined in libffi/src/x86/ffi.c.

    My expectation may be off.

  5. twall commented on Jan 13, 2014

    @twall
    Contributor

    Updated binaries on issue-300 branch. See if it fixes your issue.

  6. boscogh commented on Jan 13, 2014

    @boscogh
    Author

    just tested, works perfect, thank you very much!
    would it be included in some next release?
    I would like to post solution in the forum of provider of that 3rd party dll.
    folks tried to run it through JNA unsuccesfully since 2008 year ;-)

  7. twall commented on Jan 13, 2014

    @twall
    Contributor

    It’ll be included in the next release. It only affects w32-x86.

    On Jan 13, 2014, at 2:57 AM, boscogh notifications@github.com wrote:

    just tested, works perfect, thank you very much!
    would it be included in some next release?
    I would like to post solution in the forum of provider of that 3rd party dll.
    folks tried to run it through JNA unsuccesfully since 2008 year ;-)

    —
    Reply to this email directly or view it on GitHub.

  8. twall commented on Jan 13, 2014

    @twall
    Contributor

    BTW, this is a bug in the underlying libffi library, so a patch will be forwarded to that project as well.

    On Jan 13, 2014, at 2:57 AM, boscogh notifications@github.com wrote:

    just tested, works perfect, thank you very much!
    would it be included in some next release?
    I would like to post solution in the forum of provider of that 3rd party dll.
    folks tried to run it through JNA unsuccesfully since 2008 year ;-)

    —
    Reply to this email directly or view it on GitHub.

  9. boscogh commented on Jan 13, 2014

    @boscogh
    Author

    yes, I saw the sources of your patch and I already posted on the forum of
    the 3rd party DLL (which was a part of Quik API, btw) that this was a bug
    in libffi.
    it is very cool to see such a fast patch, I am really glad to see such a
    brilliant job!

    2014/1/13 Timothy Wall notifications@github.com

    BTW, this is a bug in the underlying libffi library, so a patch will be
    forwarded to that project as well.

    On Jan 13, 2014, at 2:57 AM, boscogh notifications@github.com wrote:

    just tested, works perfect, thank you very much!
    would it be included in some next release?
    I would like to post solution in the forum of provider of that 3rd party
    dll.
    folks tried to run it through JNA unsuccesfully since 2008 year ;-)

    Reply to this email directly or view it on GitHub.

    Reply to this email directly or view it on GitHubhttps://github.com//issues/300#issuecomment-32165077
    .

    Ó Õ×ÁÖÅÎÉÅÍ,
    ðÁ×ÅÌ íÁÌÀÔÉÎ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions