podusowski / pake

Friendly C++ build system which doesn't follow trends
2 stars 1 forks source link

on windows, pake crashes with "bad marshal data (string size out of range)" #6

Closed podusowski closed 9 years ago

podusowski commented 9 years ago

nothing special in pake scripts

podusowski commented 9 years ago

According to https://github.com/python/cpython/blob/master/Python/marshal.c#L1082 this exception will occur when marshal is reading string and the read number saying what is the size of it is "n < 0 || n > SIZE32_MAX". This means that the file is corrupted since there is no way that pake write such a big string since the reported .includes is ~60kb. The reason is that file in text mode was given to marshal module, text mode does nothing on linux, but on windows, it does translation (http://stackoverflow.com/questions/2174889/whats-the-differences-between-r-and-rb-in-fopen).