Giter Site home page Giter Site logo

Segm. fault about loadlibrary HOT 10 CLOSED

taviso avatar taviso commented on August 10, 2024
Segm. fault

from loadlibrary.

Comments (10)

taviso avatar taviso commented on August 10, 2024

Thanks, could you show me the output of the gdb command x/20hx lpSrc and x/s CreateAnsiFromWide(lpSrc)?

from loadlibrary.

 avatar commented on August 10, 2024

Here it is
bildschirmfoto_2017-05-24_16-00-12

from loadlibrary.

taviso avatar taviso commented on August 10, 2024

Well, that's confusing. It seems like it should work, and that version works fine for me.

I'll think about what could have gone wrong.

from loadlibrary.

taviso avatar taviso commented on August 10, 2024

Can you run these commands as well?

x/i $pc and i r

from loadlibrary.

 avatar commented on August 10, 2024

No hurry please :-)
bildschirmfoto_2017-05-24_16-15-29

from loadlibrary.

taviso avatar taviso commented on August 10, 2024

That is really weird, it's using movaps which has alignment requirements, but then didn't align the stack.

esp+0x3c would be 0xffffbdf4, which is obviously not 16 byte aligned. I would have expected it to either force alignment of the structure, or used movups, which has no alignment requirement.

Is this an unusual compiler? Like, pre-release gcc or something? 😕

from loadlibrary.

 avatar commented on August 10, 2024

It's the standard 'gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406'. The make was fast and successful.

from loadlibrary.

taviso avatar taviso commented on August 10, 2024

Ah-ha, I googled it a bit, someone else figured out the problem here:

http://www.peterstock.co.uk/games/mingw_sse/

I think his solution will work, I'll just add -mstackrealign to the Makefile.

from loadlibrary.

taviso avatar taviso commented on August 10, 2024

Thanks for helping to debug this, that was unexpected!

from loadlibrary.

 avatar commented on August 10, 2024

I pulled it and ... you got it. Thanks a lot :-)
bildschirmfoto_2017-05-24_16-43-49

from loadlibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.