On Monday 30 January 2012, Julien Puydt wrote: > Le 30/01/2012 03:10, Dima Pasechnik a écrit : > > Working on the ARM port (kudos to Snark), which has, unlike x86, > > unsigned char, we stumbled upon several places in Sage library (in > > Cython code) where char type was used for (essentially) operating on bit > > strings. > > To be more specific : all platforms have "unsigned char" and "signed > char", but the unadorned "char" can be either of those, depending on the > platform. On most platforms, "char" means "signed char" ; on ARM, it > means "unsigned char". > > So if your code uses bare "char", it might have portability issues. > > If you just use "char*" for runtime data buffers, then all is ok. If you > make sign tests, things get murky. If you write those buffers on disk > with the hope to use them with the same code on another platform, it's > wrong. > > If you have any doubt about a piece of code, please write to sage-devel > so we can help assess if there's a problem, and if so, get rid of it. > > Thanks, > > Snark on #sagemath
Did you by any chance test whether switching to unsigned char in the matrix_mod2 reduce function indeed fixes the issue? I don't have an ARM box here to test? Cheers, Martin -- name: Martin Albrecht _pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99 _otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF _www: http://martinralbrecht.wordpress.com/ _jab: martinralbre...@jabber.ccc.de -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org