URL:
  <http://gna.org/bugs/?22391>

                 Summary: Crash in do_paradrop()
                 Project: Freeciv
            Submitted by: pepeto
            Submitted on: jeu. 24 juil. 2014 12:47:25 CEST
                Category: general
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: Ready For Test
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: S2_5, trunk
         Discussion Lock: Any
        Operating System: Any
         Planned Release: 2.5.0-beta2, 2.6.0

    _______________________________________________________

Details:

Due to patch #3805, there is a potential use of 'punit' pointer after
unit_move().

Fix attached with a good cleanup in the whole function.


Program received signal SIGSEGV, Segmentation fault.
is_native_to_class (punitclass=0x21, pterrain=0xac21e0 <civ_terrains+896>, 
    bases=..., roads=...) at movement.c:284
284       if (BV_ISSET(pterrain->native_to, uclass_index(punitclass))) {
(gdb) bt
#0  is_native_to_class (punitclass=0x21, pterrain=0xac21e0 <civ_terrains+896>,

    bases=..., roads=...) at movement.c:284
#1  0x0000000000559f21 in is_native_tile (punittype=0x16c8030,
ptile=0xbc82e0)
    at movement.c:242
#2  0x000000000045459f in do_paradrop (punit=0x16c7f30, ptile=0xbc82e0)
    at unittools.c:2793
#3  0x00000000004eb6aa in handle_unit_paradrop_to (
    pplayer=pplayer@entry=0x24e67a0, unit_id=<optimized out>, 
    tile=<optimized out>) at unithand.c:2269
#4  0x000000000049d46d in server_handle_packet (
    type=type@entry=PACKET_UNIT_PARADROP_TO, packet=<optimized out>, 
    pplayer=pplayer@entry=0x24e67a0, pconn=pconn@entry=0x924920
<connections>)
    at hand_gen.c:217
#5  0x00000000004372e7 in server_packet_input (
    pconn=pconn@entry=0x924920 <connections>, packet=<optimized out>,
type=80)
    at srv_main.c:1652
#6  0x00000000004dc6ea in incoming_client_packets (pconn=<optimized out>)
    at sernet.c:450
#7  server_sniff_all_input () at sernet.c:846
#8  0x0000000000438905 in srv_running () at srv_main.c:2336
#9  srv_main () at srv_main.c:2808
#10 0x0000000000430aee in main (argc=1, argv=0x7fffffffddb8) at
civserver.c:454





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: jeu. 24 juil. 2014 12:47:25 CEST  Name: trunk_do_paradrop.patch  Size: 7
ko   By: pepeto

<http://gna.org/bugs/download.php?file_id=21536>
-------------------------------------------------------
Date: jeu. 24 juil. 2014 12:47:25 CEST  Name: S2_5_do_paradrop.patch  Size: 7
ko   By: pepeto

<http://gna.org/bugs/download.php?file_id=21537>

    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?22391>

_______________________________________________
  Message posté via/par Gna!
  http://gna.org/


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

Reply via email to