[Vala] Using --enable-mem-profiler



Hi all,

I'm attempting to use --enable-mem-profiler to allow me to use mem_profile() in a Vala program. However, I'm getting errors related to realloc() as soon as I attempt to create any new objects. What am I doing wrong?

I have a simple test program (mem-test.vala):
public int main(string[] args) {
    stdout.printf("Running\n");
    Object object = new Object();
    return 0;
}

I compile it with
valac --enable-mem-profiler mem-test.vala
I get a warning about an unused variable (obviously), but it compiles just fine. When I try to run it, though, I get
Running
*** Error in `./mem-test': realloc(): invalid pointer: 0x00000000017d0e80 ***
Aborted (core dumped)
Note that the print statement was able to run; the core dump occurs on the next line. The program runs fine when compiled without --enable-mem-profiler.

I'm using valac 0.26.2 on Ubuntu 14.04. But I see the same behavior with versions 0.24.0, 0.22.1, 0.20.1, 0.18.1, and 0.16.1. Am I doing something wrong, or do others see this problem as well?

Thanks,
Robert





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]