[Freeciv-Dev] (PR#6236) uninitialized citymap value
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[jdorje - Mon Sep 22 04:22:06 2003]:
> Valgrind gives this fairly often for the server:
>
> ==13287== at 0x8067A58: auto_arrange_workers (cityturn.c:235)
> ==13287== by 0x8064F54: create_city (citytools.c:1015)
> ==13287== by 0x8057618: city_build (unithand.c:575)
> ==13287== by 0x8057675: handle_unit_build_city (unithand.c:595)
> ==13287== by 0x8095956: ai_do_build_city (settlers.c:71)
> ==13287== by 0x8098D06: auto_settler_findwork (settlers.c:1328)
> ==13287== by 0x80990B3: auto_settlers_player (settlers.c:1402)
> ==13287== by 0x80996C9: auto_settlers (settlers.c:1548)
> ==13287== by 0x804F34F: main_loop (srv_main.c:1502)
> ==13287== by 0x804FA8E: srv_loop (srv_main.c:1803)
> ==13287== by 0x804F512: srv_main (srv_main.c:1590)
> ==13287== by 0x804A20F: main (civserver.c:154)
>
> The callers may vary, but the line remains the same.
>
> Could relate to PR#6222, but I doubt it (this is just an invalid read).
> This may have been reported before. We really need to fix it.
The culprit is the worker_positions_used field. In the client this is
memset to 0 before it is used. In the server it's not.
jason
|
|