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

malloc error in unit test #9509

Closed
DartBot opened this issue Mar 29, 2013 · 3 comments
Closed

malloc error in unit test #9509

DartBot opened this issue Mar 29, 2013 · 3 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Mar 29, 2013

This issue was originally filed by perrys...@gmail.com


What steps will reproduce the problem?

Not exactly sure what in here is causing the error. I tried to break it down further but even taking out the '_two' seemed to resolve the malloc issue so I just extracted and reproduced the offending pattern with simple classes and unit test.

main() {
  test('temp', () {
    Thing.wrapper()();
  });
}

class Foo {
  final bool _one;
  final int _two;

  const Foo._(this._one, this._two);

  static final dynamic ctor = () {
    return new Foo._(true, 10);
  };
}
class Thing {
  static final dynamic wrapper = () {
    return () {
      other(null, values: null);
    };
  };

  static final dynamic other = (Action foo, [Foo values]) {
    if(values == null) { values = Foo.ctor(); }
  };
}

What is the expected output? What do you see instead?

Thinking that a malloc isn't the level of error I should be seeing in the editor :)

unittest-suite-wait-for-done
dart(6922,0xb0185000) malloc: *** error for object 0xb0183414: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

What version of the product are you using? On what operating system?

Mac OSX Mountain Lion
Dart Editor version 0.4.3_r20602
Dart SDK version 0.4.3.5_r20602

Please provide any additional information below.

@dgrove
Copy link
Contributor

dgrove commented Mar 29, 2013

Added Area-VM, Triaged labels.

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Jun 5, 2013
@iposva-google
Copy link
Contributor

Stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

4 participants