Giter Site home page Giter Site logo

Comments (3)

katef avatar katef commented on August 26, 2024
; ./build/bin/fsm -t trim tests/trim/in0.fsm 
fsm: src/adt/set.c:346: set_first: Assertion `set->a != NULL' failed.
zsh: abort      ./build/bin/fsm -t trim tests/trim/in0.fsm

from libfsm.

katef avatar katef commented on August 26, 2024
; valgrind ./build/bin/fsm -t trim tests/trim/in0.fsm
==17090== Memcheck, a memory error detector
==17090== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==17090== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==17090== Command: ./build/bin/fsm -t trim tests/trim/in0.fsm
==17090== 
==17090== Invalid read of size 8
==17090==    at 0x11C4C3: free_contents (fsm.c:37)
==17090==    by 0x11C645: fsm_free (fsm.c:83)
==17090==    by 0x10E044: main (main.c:541)
==17090==  Address 0x4a42918 is 40 bytes inside a block of size 48 free'd
==17090==    at 0x48369AB: free (vg_replace_malloc.c:530)
==17090==    by 0x11D159: sweep_states (trim.c:144)
==17090==    by 0x11D1D5: fsm_trim (trim.c:178)
==17090==    by 0x10DC66: main (main.c:428)
==17090==  Block was alloc'd at
==17090==    at 0x483577F: malloc (vg_replace_malloc.c:299)
==17090==    by 0x10E155: f_malloc (alloc.c:40)
==17090==    by 0x11CBB8: fsm_addstate (state.c:27)
==17090==    by 0x10C3AA: p_edges_C_Cedge (parser.act:228)
==17090==    by 0x10C13C: p_edges (parser.c:263)
==17090==    by 0x10CB51: p_fsm (parser.c:795)
==17090==    by 0x10D0D6: fsm_parse (parser.act:408)
==17090==    by 0x10DAE8: main (main.c:389)

from libfsm.

silentbicycle avatar silentbicycle commented on August 26, 2024

This use-after-free is because trim isn't updating fsm->start. PR incoming.

from libfsm.

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.