bugFreeciv - Bugs: bug #20517, Invalid read of size 4 in ruleset...

 
 
Show feedback again

bug #20517: Invalid read of size 4 in ruleset reloading cycle

Submitted by:  pepeto <pepeto>
Submitted on:  Sat Feb 16 21:31:53 2013  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: pepeto <pepeto>Open/Closed: Closed
Release: S2_3, S2_4, trunkOperating System: Any
Planned Release: 2.3.5, 2.4.0, 2.5.0Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Wed Feb 20 09:53:40 2013, SVN revision 22401:

Clear players' nation, governments and city_style in game_ruleset_free().
Clear game.government_during_revolution pointer in game_ruleset_free().
Remove other similar hacks from the client and server code.
Discards PACKET_PLAYER_INFO in the middle of ruleset or game (re)loading cycles.

See gna bug #20517 and bug #19814

(Browse SVN revision 22401)

pepeto <pepeto>
Project MemberIn charge of this item.
Wed Feb 20 09:53:38 2013, SVN revision 22400:

Clear players' nation, governments and city_style in game_ruleset_free().
Clear game.government_during_revolution pointer in game_ruleset_free().
Remove other similar hacks from the client and server code.
Discards PACKET_PLAYER_INFO in the middle of ruleset or game (re)loading cycles.

See gna bug #20517 and bug #19814

(Browse SVN revision 22400)

pepeto <pepeto>
Project MemberIn charge of this item.
Wed Feb 20 09:53:37 2013, SVN revision 22399:

Clear players' nation, governments and city_style in game_ruleset_free().
Clear game.government_during_revolution pointer in game_ruleset_free().
Remove other similar hacks from the client and server code.
Discards PACKET_PLAYER_INFO in the middle of ruleset or game (re)loading cycles.

See gna bug #20517 and bug #19814

(Browse SVN revision 22399)

pepeto <pepeto>
Project MemberIn charge of this item.
Mon Feb 18 13:03:08 2013, comment #4:

I have no idea why patches for S2_3 and S2_4 have been truncated.

Also, notice that it solves the failed assertions of bug #20520.

(file #17251, file #17252)

pepeto <pepeto>
Project MemberIn charge of this item.
Mon Feb 18 12:44:14 2013, comment #3:

The attached patch:

  • clear players' nation, governments and city_style in game_ruleset_free() ;
  • clear game.government_during_revolution pointer in game_ruleset_free() (this one should solve the problem) ;
  • remove other similar hacks from the client and server code ;
  • discards PACKET_PLAYER_INFO in the middle of ruleset or game (re)loading cycle.

(file #17248, file #17249, file #17250)

pepeto <pepeto>
Project MemberIn charge of this item.
Mon Feb 18 10:14:17 2013, comment #2:

When applying this patch, we may be confronted for the same problem as bug #20520 if both rulesets don't have the same number of government types. However, it isn't as much problematic because players can have the same government type...

Maybe governments types should be limited to (MAX_NUM_ITEMS / 2), using SINT8 for using -1 as government id?

Maybe we should avoid to send player info packets during the ruleset reloading cycle? (this appear to me the best solution)

pepeto <pepeto>
Project MemberIn charge of this item.
Sat Feb 16 23:13:02 2013, comment #1:

See also bug #19814

pepeto <pepeto>
Project MemberIn charge of this item.
Sat Feb 16 21:31:53 2013, original submission:

dio_put_uint8() and valgrid reported a read error in ruleset reloading cycle:

Patch attached which fix the problem for me. But I'm scared for secondary effects.

pepeto <pepeto>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #17252:  S2_3_ruleset_reload.diff added by pepeto (8kB - text/x-diff)
file #17251:  S2_4_ruleset_reload.diff added by pepeto (8kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pepeto (Submitted the item)
  •  

    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.

     

    Error: not logged in

     

     

    Follow 15 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Feb 20 09:54:05 2013pepetoStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
      Operating SystemNone=>Any
    Mon Feb 18 13:03:08 2013pepetoAttached File-=>Added S2_4_ruleset_reload.diff, #17251
      Attached File-=>Added S2_3_ruleset_reload.diff, #17252
    Mon Feb 18 13:00:52 2013pepetoAttached File#17250=>Removed
    Mon Feb 18 13:00:46 2013pepetoAttached File#17249=>Removed
    Mon Feb 18 12:44:14 2013pepetoAttached File-=>Added trunk_ruleset_reload.diff, #17248
      Attached File-=>Added S2_4_ruleset_reload.diff, #17249
      Attached File-=>Added S2_3_ruleset_reload.diff, #17250
      StatusNeed Info=>Ready For Test
      Assigned toNone=>pepeto
      Planned Release=>2.3.5, 2.4.0, 2.5.0
    Mon Feb 18 10:14:17 2013pepetoStatusReady For Test=>Need Info
    Sat Feb 16 21:31:53 2013pepetoAttached File-=>Added ruleset_reload_player_gov.diff, #17223
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup