Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memory leak in lwgeom_offsetcurve #291

Closed

Conversation

@Algunenano
Copy link
Member

commented Sep 7, 2018

$ ./cunit/.libs/lt-cu_tester test_geos_offsetcurve_crash

Running test 'test_geos_offsetcurve_crash' in suite 'geos'.

    PASSED - asserts -   0 passed,   0 failed,   0 total.




=================================================================
==25759==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x55dfc4a27631 in __interceptor_malloc (/home/raul/dev/public/postgis/liblwgeom/cunit/.libs/lt-cu_tester+0xf0631)
    #1 0x7f8ca2eede6e in lwline_construct /home/raul/dev/public/postgis/liblwgeom/lwline.c:45:21
    #2 0x7f8ca2f88d24 in GEOS2LWGEOM /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:180:19
    #3 0x7f8ca2f92b3e in lwgeom_node /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos_node.c:172:10
    #4 0x7f8ca2f8c6d3 in lwgeom_offsetcurve /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:1395:12
    #5 0x55dfc4a6c51b in test_geos_offsetcurve_crash /home/raul/dev/public/postgis/liblwgeom/cunit/cu_geos.c:118:16
    #6 0x7f8ca2c08117  (/usr/lib/libcunit.so.1+0x4117)

Indirect leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x55dfc4a27631 in __interceptor_malloc (/home/raul/dev/public/postgis/liblwgeom/cunit/.libs/lt-cu_tester+0xf0631)
    #1 0x7f8ca2ed6b0e in ptarray_construct_empty /home/raul/dev/public/postgis/liblwgeom/ptarray.c:84:30
    #2 0x7f8ca2ed6b0e in ptarray_construct /home/raul/dev/public/postgis/liblwgeom/ptarray.c:64
    #3 0x7f8ca2f88934 in ptarray_from_GEOSCoordSeq /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:129:7
    #4 0x7f8ca2f88d16 in GEOS2LWGEOM /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:179:8
    #5 0x7f8ca2f92b3e in lwgeom_node /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos_node.c:172:10
    #6 0x7f8ca2f8c6d3 in lwgeom_offsetcurve /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:1395:12
    #7 0x55dfc4a6c51b in test_geos_offsetcurve_crash /home/raul/dev/public/postgis/liblwgeom/cunit/cu_geos.c:118:16
    #8 0x7f8ca2c08117  (/usr/lib/libcunit.so.1+0x4117)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x55dfc4a27631 in __interceptor_malloc (/home/raul/dev/public/postgis/liblwgeom/cunit/.libs/lt-cu_tester+0xf0631)
    #1 0x7f8ca2ed6a51 in ptarray_construct_empty /home/raul/dev/public/postgis/liblwgeom/ptarray.c:72:19
    #2 0x7f8ca2ed6a51 in ptarray_construct /home/raul/dev/public/postgis/liblwgeom/ptarray.c:64
    #3 0x7f8ca2f88934 in ptarray_from_GEOSCoordSeq /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:129:7
    #4 0x7f8ca2f88d16 in GEOS2LWGEOM /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:179:8
    #5 0x7f8ca2f92b3e in lwgeom_node /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos_node.c:172:10
    #6 0x7f8ca2f8c6d3 in lwgeom_offsetcurve /home/raul/dev/public/postgis/liblwgeom/lwgeom_geos.c:1395:12
    #7 0x55dfc4a6c51b in test_geos_offsetcurve_crash /home/raul/dev/public/postgis/liblwgeom/cunit/cu_geos.c:118:16
    #8 0x7f8ca2c08117  (/usr/lib/libcunit.so.1+0x4117)

SUMMARY: AddressSanitizer: 152 byte(s) leaked in 3 allocation(s).
@Algunenano

This comment has been minimized.

Copy link
Member Author

commented Sep 7, 2018

@strk strk closed this in 12fa024 Sep 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.