bugpokersource - Bugs: bug #15273, DECK_ENUMERATE_COMBINATIONS_D core...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #15273: DECK_ENUMERATE_COMBINATIONS_D core dump

Submitted by:  Loic Dachary <loic>
Submitted on:  Wed 03 Feb 2010 03:21:28 PM UTC  
 
Category: poker-evalSeverity: 5 - Blocker
Priority: 7 - HighStatus: Need Info
Privacy: PublicAssigned to: None
Open/Closed: Open

Tue 23 Feb 2010 05:24:17 PM UTC, comment #1:

Please confirm this has been fixed with:
http://svn.gna.org/viewcvs/pokersource/?rev=6402&view=rev

Johan Euphrosine <proppy>
Project Member
Wed 03 Feb 2010 03:21:28 PM UTC, original submission:

(03:41:53 PM) jonk: ==29339== Invalid write of size 8
(03:41:53 PM) jonk: ==29339== at 0x6059546: pyenumExhaustive (pypokereval.c:317)
(03:42:07 PM) jonk: looks like it does not work with int * on 64 bit
(03:48:17 PM) jonk: ok, i fixed it.
(03:48:36 PM) dachary: :-D
(03:48:41 PM) jonk: In DECK_ENUMERATE_COMBINATIONS_D all calls of sizeof(int) must be sizeof(intptr_t)
(03:48:50 PM) jonk: in enumerate.h
(03:49:00 PM) jonk: sorry no svn version, so can't patch..
(03:50:44 PM) jonk: is anyone in charge here?
(03:56:54 PM) mongolito404: That would be dachary
(04:01:39 PM) jonk: dachary: can you please commit the fix? it affects all exhaustive search for pypoker-eval. and for any C program that calls DECK_ENUMERATE_COMBINATIONS_D

enumerate.h tentative patch (not correct)
622,624c621,623
< _ncombo = (int ) malloc(num_sets sizeof(int)); \
< _curIndex = (int ) malloc(num_sets sizeof(int)); \
< _curElem = (int **) malloc(num_sets * sizeof(int)); \
---

> _ncombo = (int ) malloc(num_sets sizeof(intptr_t)); \
> _curIndex = (int ) malloc(num_sets sizeof(intptr_t)); \
> _curElem = (int **) malloc(num_sets * sizeof(intptr_t)); \

629c628
< _curElem[_i] = (int ) malloc(set_sizes[_i] sizeof(int)); \
---

> _curElem[_i] = (int ) malloc(set_sizes[_i] sizeof(intptr_t)); \


Loic Dachary <loic>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by proppy (Posted a comment)
  • -unavailable- added by loic (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.

     

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

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 23 Feb 2010 05:24:17 PM UTCproppyStatusConfirmed=>Need Info
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup