-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix base(b, big(0), 0) == "0" #22133
Conversation
Bump (CI failure is unrelated). |
bump |
FreeBSD CI builds failed after this PR merged https://julia.iblis.cnmc.tw/#/builders/1/builds/25 |
Ouch, it seems the |
write(buf, s) | ||
String(buf) | ||
isneg(n) && unsafe_store!(ptr, '-' % UInt8) | ||
str.len -= 1 # final '\0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stacktrace point out this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good that the len field is removed....
remove the use of String's len field (introduced in #22133)
Before merging, should really check that the CI result isn't so old as to be obsolete when a PR hasn't had any recent activity. |
Yeah, sorry about that. |
Unless we want to re-run every PR every 24 hrs, this stuff is just going to happen sometimes. Best lesson is to merge good work quickly. We need an army of @tkelman(s) with their insightful eyes on everything all the time 😄. |
We can re-run the ones that are ready to merge before doing so, if it's been more than a few days since CI last ran. |
This either has to be automated a la Rust or it will keep happening. |
homu does not support appveyor barosl/homu#87 for now please put a bit of thought into how old the CI results are before you merge something. |
When
pad==0
,base
should give""
on inputbig(0)
.I merged the two versions
base(b, ::BigInt)
andbase(b, ::BigInt, pad)
. Withoutpad
, it gets about 10% slower (so I could re-add the old version if requested), but the version with a pad is vastly faster (it gets faster whenpad
gets bigger).Also I'm not sure: the buffer sent to libgmp must contain space for a final
'\0'
, do I need to handle that manually orSting
allocates automatically 1 byte for it?