Ticket #36 (assigned defect)

Opened 3 years ago

Last modified 3 years ago

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)

Attachments

patch Download (2.0 KB) - added by grep 3 years ago.

Change History

Changed 3 years ago by grep

Changed 3 years ago by ug

  • status changed from new to assigned

Thanks for the report, and for the patch - that's very helpful. I will build a new version as soon as possible.

Note: See TracTickets for help on using tickets.