Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

calling render with null data results in 'malloc pointer being freed was not allocated' #554

Closed
DinisCruz opened this issue Nov 25, 2014 · 5 comments

Comments

@DinisCruz
Copy link

here is the test that replicates the issue

describe 'test-SCSS_Compiler',->

  it 'throws malloc error', (done)->
    sass = require('node-sass');
    options =
      data: null,
      outputStyle: 'compressed',
      success: done
    sass.render options

  return

which results in

node ./node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --recursive -R list tests


  1) test-SCSS_Compiler throws malloc errpr
node(9602,0x7fff7c770300) malloc: *** error for object 0x103c88e44: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

Screenshot of error

screen shot 2014-11-25 at 17 51 16

@am11
Copy link
Contributor

am11 commented Nov 25, 2014

Hello,

Well, it appears to be a trivial edge case.

Perhaps @mgreter might be able to take a look OR this is already fixed with new libsass API (which we are at the verge of finalizing the implementation: #543).

Nonetheless, we will take a look.

Thanks!

@am11
Copy link
Contributor

am11 commented Dec 24, 2014

v2.0.0-beta is just released. Please test if you can reproduce this issue.

@DinisCruz
Copy link
Author

ok I will try it (tracking this action here TeamMentor/TM_4_0_Design#179)

@am11
Copy link
Contributor

am11 commented Dec 26, 2014

Lets track this issue at sass/libsass#776.

@am11 am11 closed this as completed Dec 26, 2014
@jasisk
Copy link

jasisk commented Jan 6, 2015

This also occurs if data is a buffer which—it would seem—hasn't always been the case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants