buggnubg - Bugs: bug #6343, g_malloc does not zero memory!

 
 

bug #6343: g_malloc does not zero memory!

Submitted by:  None
Submitted on:  Mon 03 Nov 2003 07:50:19 PM UTC  
 
Originator Name: Dennis HaneyOriginator Email: -unavailable-
Item Group: Other bugCategory: Command line interface
Release: 0.14-develPrivacy: Public
Operating System: AllOS Type: None
Processor Type: NoneSeverity: 2 - Minor
Open/Closed: ClosedAssigned to: Jon Kinsey <Superfly_Jon>
Priority: 5 - NormalStatus: Fixed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 02 Feb 2004 10:31:28 AM UTC, comment #4:

It all seems fine for me with the lastest code.
If you find anymore give me the details of what you did to get the errors.

Jon

Ps. (I've closed this bug report now)

Jon Kinsey <Superfly_Jon>
Project AdministratorIn charge of this item.
Wed 03 Dec 2003 03:55:36 AM UTC, comment #3:

much better... Now use it to find all the crashes that are currently in cvs :P

Here is one you didn't fix:

==20430==
==20430== Use of uninitialised value of size 4
==20430== at 0x8077216: EvaluatePositionCubeful4 (eval.c:5817)
==20430== by 0x8076C30: EvaluatePositionCubeful3 (eval.c:5659)
==20430== by 0x807718F: EvaluatePositionCubeful4 (eval.c:5803)
==20430== by 0x8076C30: EvaluatePositionCubeful3 (eval.c:5659)

and another

==20430==
==20430== Conditional jump or move depends on uninitialised value(s)
==20430== at 0x80715B6: ApplyMove (eval.c:3124)
==20430== by 0x8079710: MoveKey (eval.c:6878)
==20430== by 0x8079660: locateMove (eval.c:6854)
==20430== by 0x806441B: HintChequer (gnubg.c:4033)
==20430==
==20430== Conditional jump or move depends on uninitialised value(s)
==20430== at 0x80714A6: ApplySubMove (eval.c:3093)
==20430== by 0x8071603: ApplyMove (eval.c:3125)
==20430== by 0x8079710: MoveKey (eval.c:6878)
==20430== by 0x8079660: locateMove (eval.c:6854)
==20430==
==20430== Conditional jump or move depends on uninitialised value(s)
==20430== at 0x80714AC: ApplySubMove (eval.c:3093)
==20430== by 0x8071603: ApplyMove (eval.c:3125)
==20430== by 0x8079710: MoveKey (eval.c:6878)
==20430== by 0x8079660: locateMove (eval.c:6854)
==20430==
==20430== Conditional jump or move depends on uninitialised value(s)
==20430== at 0x80714B2: ApplySubMove (eval.c:3093)
==20430== by 0x8071603: ApplyMove (eval.c:3125)
==20430== by 0x8079710: MoveKey (eval.c:6878)
==20430== by 0x8079660: locateMove (eval.c:6854)
==20430==
==20430== Use of uninitialised value of size 4
==20430== at 0x80714C0: ApplySubMove (eval.c:3093)
==20430== by 0x8071603: ApplyMove (eval.c:3125)
==20430== by 0x8079710: MoveKey (eval.c:6878)
==20430== by 0x8079660: locateMove (eval.c:6854)

Anonymous
Mon 24 Nov 2003 10:04:37 AM UTC, comment #2:

I ran some initial tests and there where a couple of valgrind errors. Once I fixed these the command line build ran fine.

The gui build did complain that 3000+ errors had been found but I think these are supressed errors as no error reports were displayed. I'll look in to this a bit more soon.

Jon

Jon Kinsey <Superfly_Jon>
Project AdministratorIn charge of this item.
Tue 18 Nov 2003 07:56:57 PM UTC, comment #1:

Hi,

This line in itself isn't a bug. Only if the variable is read before it's initialized is there a bug. Valgrind should be able to pick up if this happens.
Note that setting the memory to zero doesn't help (as zero might not be a good value for the members of boarddata).

30,000 sounds like a lot of errors, perhaps these are in gtk? Could be worth trying the command line program.

Jon

Jon Kinsey <Superfly_Jon>
Project AdministratorIn charge of this item.
Mon 03 Nov 2003 07:50:19 PM UTC, original submission:

This line in gtkboard.c does not zero the memory it allocates!
BoardData bd = g_malloc( sizeof( bd ) );

Have you even tried running gnubg under valgrind? There is over 30000 uses of uninitilized values during startup!

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 02 Feb 2004 10:31:28 AM UTCSuperfly_JonItem GroupCrash error=>Other bug
  CategoryGraphical User Interface=>Command line interface
  Open/ClosedOpen=>Closed
  Priority3 - Low=>5 - Normal
  StatusNone=>Fixed
Mon 24 Nov 2003 10:04:37 AM UTCSuperfly_JonSeverity3 - Normal=>(Error - Not Found)
  Assigned toNone=>NA

Back to the top


Powered by Savane 3.1-cleanup1