|
From: (Rebecca) X. Y. <xy...@co...> - 2010-01-18 22:08:34
|
Hi, I met some errors of my code and the message was very long, part of it said that "Uninitialised value was created by a heap allocation" as below: ==9725== Conditional jump or move depends on uninitialised value(s) ==9725== at 0x80BCFC3: SNESSolve_LS (ls.c:168) ==9725== by 0x809E6E3: SNESSolve (snes.c:2221) ==9725== by 0x80B71E4: DMMGSolveSNES (damgsnes.c:510) ==9725== by 0x80B0A23: DMMGSolve (damg.c:372) ==9725== by 0x8050E41: Solve (twgcqt2unffnidgp.c:580) ==9725== by 0x804DBE0: main (twgcqt2unffnidgp.c:288) ==9725== Uninitialised value was created by a heap allocation ==9725== at 0x4022BF3: malloc (vg_replace_malloc.c:195) ==9725== by 0x8628840: PetscMallocAlign (mal.c:40) ==9725== by 0x862992F: PetscTrMallocDefault (mtr.c:194) ==9725== by 0x8056AFD: FormFunction (twgcqt2unffnidgp.c:1111) ==9725== by 0x80953E8: SNESComputeFunction (snes.c:1016) ==9725== by 0x80BCD06: SNESSolve_LS (ls.c:159) ==9725== by 0x809E6E3: SNESSolve (snes.c:2221) ==9725== by 0x80B71E4: DMMGSolveSNES (damgsnes.c:510) ==9725== by 0x80B0A23: DMMGSolve (damg.c:372) ==9725== by 0x8050E41: Solve (twgcqt2unffnidgp.c:580) ==9725== by 0x804DBE0: main (twgcqt2unffnidgp.c:288) What could be wrong with it? Thanks very much! Rebecca -- (Rebecca) Xuefei YUAN Department of Applied Physics and Applied Mathematics Columbia University Tel:917-399-8032 www.columbia.edu/~xy2102 |
|
From: Dan K. <da...@ke...> - 2010-01-18 22:40:37
|
On Mon, Jan 18, 2010 at 1:34 PM, (Rebecca) Xuefei YUAN <xy...@co...> wrote: > I met some errors of my code and the message was very long, part of it > said that "Uninitialised value was created by a heap allocation" as > below: Cut down to the essential, that message says Conditional jump or move depends on uninitialised value(s) at SNESSolve_LS (ls.c:168) Uninitialised value was created by a heap allocation at malloc (vg_replace_malloc.c:195) by PetscMallocAlign (mal.c:40) by PetscTrMallocDefault (mtr.c:194) by FormFunction (twgcqt2unffnidgp.c:1111) by SNESComputeFunction (snes.c:1016) by SNESSolve_LS (ls.c:159) So memory is allocated at line 159 of ls.c (by calling SNESComputeFunction, which calls FormFunction, which allocates memory at line 1111 of twgcqt2unffnidgp.c), but not initialized, and it is then used at line 168 of ls.c That's how you read those messages. - Dan |