Git Product home page Git Product logo

Comments (2)

0-wiz-0 avatar 0-wiz-0 commented on June 12, 2024 1

The line len = ZIP_LENGTH_TO_END just assigns 0 to an integer variable.
libzip is written in C, so it doesn't throw or catch exceptions.
I'm sorry, you'll have to debug this a bit more yourself. Perhaps start with adding error checking (the code you pasted has none, I hope your real code has much more).

from libzip.

RCECoder avatar RCECoder commented on June 12, 2024

The line len = ZIP_LENGTH_TO_END just assigns 0 to an integer variable. libzip is written in C, so it doesn't throw or catch exceptions. I'm sorry, you'll have to debug this a bit more yourself. Perhaps start with adding error checking (the code you pasted has none, I hope your real code has much more).

I know that it's just assigning 0 to a variable but it will be compiled as LDS EDI,ECX (I've personally checked this under debugger)
However, I can't seem to find the exact cause of why it can't run past that as it works fine under real x86-64 CPU.
I will come back here later after doing more investigation into this.

Edited:
It appears that for some reason, the AVX instruction set was the cause of this crash.
Particularly the option in Visual Studio Configuration Properties > C/C++ > Code Generation > Enable Enhanced Instruction Set. Apparently, those instruction set weren't supported or properly virtualized on the machine I ran the code.

I used a newer debugger (x64dbg) to view the code that caused the crash. Ollydbg's disassembler is outdated and does not support disassembling of AVX instructions that's why it was showing a completly different instruction.

from libzip.

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.