Giter Site home page Giter Site logo

Comments (6)

jgm avatar jgm commented on June 3, 2024

It would be most helpful if you could reproduce the problem
using just cmark (or libcmark). Then we'd know the problem
is with cmark and not with your interface code. I couldn't
reproduce any problems converting this file with cmark.

You say the problem is just in rendering to xml, not to
other formats?

What kind of "crashes"?

Are you sure it's non-ascii characters that cause the
problem? I didn't see any in line 888.

from cmark.

jeroen avatar jeroen commented on June 3, 2024

As said I had great difficulty diagnosing the exact problem, it is very unpredictable and appears only on windows. It freezes during cmark_render_xml (other formats work fine). I'll see if I can build the cmark CLI on windows to have a smaller example. My wrapper is very thin, it just passes along a cont char* not too much can go wrong there.

from cmark.

jeroen avatar jeroen commented on June 3, 2024

I was able to reproduce the problem using a windows build for cmark.exe. I put a copy of my build and the NEWS.md file here: http://www.stat.ucla.edu/~jeroen/files/cmark-win32.zip.

To reproduce the problem, open a windows shell and run:

cmark -t xml NEWS.md

Other formats work fine:

cmark -t html NEWS.md
cmark -t man NEWS.md

from cmark.

jeroen avatar jeroen commented on June 3, 2024

I tried building cmark it with a more recent vesion of gcc on windows and I keep getting segmentation faults when running this example.

from cmark.

nwellnhof avatar nwellnhof commented on June 3, 2024

This can be reproduced by running

cmark -t xml NEWS.md

on Windows. I tracked it down to the call to vsnprintf in cmark_strbuf_vprintf. The Windows version of snprintf is not POSIX/C99-compliant as it returns -1 if the output was truncated.

from cmark.

jeroen avatar jeroen commented on June 3, 2024

Here is some strace output: http://pastebin.com/raw.php?i=D6AgsCCd
And here is output from drmemory: http://pastebin.com/raw.php?i=26N2Q7xE

from cmark.

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.