pioz / chess

A fast chess library that use bitboards to play chess with Ruby
GNU Lesser General Public License v3.0
60 stars 17 forks source link

Segmentation fault in move generator #23

Closed kamil-gwozdz closed 3 years ago

kamil-gwozdz commented 3 years ago

Generating possible moves for this position: rnbqkbnr/1ppppppp/8/8/pP2P3/P7/2PP1PPP/RNBQKBNR w KQkq - 0 3' and the C2 field leads to a segmentation fault.

I added a failing spec here: https://github.com/kamil98/chess/commit/a452c9f88b7ffea90978a11674313e00bfb9f59e

I tested it with ruby 2.7.2.

pioz commented 3 years ago

I've added your spec (https://github.com/pioz/chess/commit/f8056dc34203897ebf616a25223726494fa91ea8) and then I' ve tried to run the test on my machine with ruby 2.7.2:

cd ext
ruby extconf.rb
make
cd ..
rake test

I get no errors and all test passed.

Can you provide more info?

kamil-gwozdz commented 3 years ago

Sadly I can't reproduce it now, even with the same spec :(

I saved the crash report, hope it helps.

ruby_2021-01-17-224509_MacBook-Pro-Kamil.crash.txt

kamil-gwozdz commented 3 years ago

Since the bug is not reproducible I guess I'll just close the issue.

Thanks for your help!