Skip to content
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

strbasics.strip SIGBUS with --gc:arc #17173

Closed
timotheecour opened this issue Feb 24, 2021 · 0 comments · Fixed by #17213
Closed

strbasics.strip SIGBUS with --gc:arc #17173

timotheecour opened this issue Feb 24, 2021 · 0 comments · Fixed by #17213

Comments

@timotheecour
Copy link
Member

Example

import std/strbasics
var a = "  vhellov   "
strip(a)

Current Output

Traceback (most recent call last)
/Users/timothee/git_clone/nim/timn/tests/nim/all/t11905.nim(7) t11905
/Users/timothee/git_clone/nim/Nim_devel/lib/std/strbasics.nim(97) strip
/Users/timothee/git_clone/nim/Nim_devel/lib/std/strbasics.nim(67) setSlice
SIGBUS: Illegal storage access. (Attempt to read from nil?)

Expected Output

works

Additional Information

1.5.1 e9a287f

Araq added a commit that referenced this issue Mar 1, 2021
@Araq Araq closed this as completed in bb0c19f Mar 1, 2021
@timotheecour timotheecour mentioned this issue Mar 2, 2021
3 tasks
timotheecour added a commit to timotheecour/Nim that referenced this issue Mar 2, 2021
Araq pushed a commit that referenced this issue Mar 2, 2021
ringabout added a commit to ringabout/Nim that referenced this issue Mar 22, 2021
* fixes nim-lang#17173

* add testcase (nim-lang#17214)

* Apply suggestions from code review

* fix for newruntime

* Apply suggestions from code review

* Update lib/system.nim

* Update lib/system.nim

* Update lib/system.nim

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

Co-authored-by: flywind <xzsflywind@gmail.com>
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
ringabout pushed a commit to ringabout/Nim that referenced this issue Mar 22, 2021
ardek66 pushed a commit to ardek66/Nim that referenced this issue Mar 26, 2021
* fixes nim-lang#17173

* add testcase (nim-lang#17214)

* Apply suggestions from code review

* fix for newruntime

* Apply suggestions from code review

* Update lib/system.nim

* Update lib/system.nim

* Update lib/system.nim

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

Co-authored-by: flywind <xzsflywind@gmail.com>
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
ardek66 pushed a commit to ardek66/Nim that referenced this issue Mar 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant