Ticket #36 (assigned defect)
buffer_info() gives overflow
| Reported by: | grep | Owned by: | ug |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | search_engine | Version: | |
| Keywords: | Cc: |
Description
Parsing of SGF database fails with a message box:
A fatal error occured when processing /usr/local/sgf/KGS2001. Please send a bug report.
The problem occurs only with C modules compiled.
It was found that when calling C functions matchC.sortArray and matchC.buildOutput, the array buffer address from buffer_info() is sent. On ix86 Linux (and probably on 64-bit systems), this address sometimes doesn't fit to the int type.
As a temporary workaround, I've patched matchC.cc and kombilo.py for using python buffer interface (the patch is attached). Hope it will work
Some rework is still needed for 64-bit machines for using integer types of know size (e.g. int32_t instead of long)

