[Freeciv-Dev] [bug #17742] Setting killcitizen messes memory

2011-02-18 Thread Marko Lindqvist

Follow-up Comment #2, bug #17742 (project freeciv):

 Is this something you found with valgrind?

No, I was working on patch adding another bitwise setting. I had initially
declared that variable char, and that caused problems as variable next to it
got changed also. I then checked other bitwise settings and noticed this
potential problem.


___

Reply to this item at:

  http://gna.org/bugs/?17742

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17742] Setting killcitizen messes memory

2011-02-17 Thread Jacob Nevins

Follow-up Comment #1, bug #17742 (project freeciv):

S2_3 is the same as trunk in this regard, I think.

However, in my build at least, (struct packet_game_info).killcitizen (as
instantiated in game.info.killcitizen) is declared as int (even though it's
UINT8 in packets.def). You'd normally (always?) expect this to be the same
size as unsigned -- messy (cf bug #16457) but not actually a memory
scribbler. However, I don't know if the content of packets_gen.h is
machine-dependent or something.

Is this something you found with valgrind?

___

Reply to this item at:

  http://gna.org/bugs/?17742

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #17742] Setting killcitizen messes memory

2011-02-15 Thread Marko Lindqvist

URL:
  http://gna.org/bugs/?17742

 Summary: Setting killcitizen messes memory
 Project: Freeciv
Submitted by: cazfi
Submitted on: Tue 15 Feb 2011 06:36:54 PM EET
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

In packets.def killcitizen is defined as UINT8. When it's set as bitwise
setting in settings.c, sizeof(unsigned) bytes are written.

TRUNK at least, not checked S2_3.




___

Reply to this item at:

  http://gna.org/bugs/?17742

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev