https://bugs.kde.org/show_bug.cgi?id=463514

--- Comment #3 from Paul Floyd <pjfl...@wanadoo.fr> ---
OK, next thing, make sure that your heap memory really is being allocated. You
have

        ptr = (char *) calloc(1,20);
        ptr = "Hello World\n";

I'm not sure if it is intentional to overwrite the 'ptr' pointer. (And you
shouldn't cast the return value of calloc in C, unlike C++).

Just using 'volatile char* ptr = strdup("Hello World\n");' should be
sufficient, with the volatile to try to prevent the compiler from optimizing
away 'ptr'.

Can you check with a debugger to see if the memory really does get allocated?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to