Title: integers: `Int.toStringAs` leaks a global `n` · Issue #51 · purescript-lua/purescript-lua · GitHub
Open Graph Title: integers: `Int.toStringAs` leaks a global `n` · Issue #51 · purescript-lua/purescript-lua
X Title: integers: `Int.toStringAs` leaks a global `n` · Issue #51 · purescript-lua/purescript-lua
Description: purescript-lua-integers issues are disabled, so filing here. In src/Data/Int.lua, toStringAs assigns to n without declaring it local: toStringAs = (function(radix) return function(i) local floor, insert = math.floor, table.insert n = flo...
Open Graph Description: purescript-lua-integers issues are disabled, so filing here. In src/Data/Int.lua, toStringAs assigns to n without declaring it local: toStringAs = (function(radix) return function(i) local floor, i...
X Description: purescript-lua-integers issues are disabled, so filing here. In src/Data/Int.lua, toStringAs assigns to n without declaring it local: toStringAs = (function(radix) return function(i) local floor, i...
Opengraph URL: https://github.com/purescript-lua/purescript-lua/issues/51
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"integers: `Int.toStringAs` leaks a global `n`","articleBody":"`purescript-lua-integers` issues are disabled, so filing here.\n\nIn `src/Data/Int.lua`, `toStringAs` assigns to `n` without declaring it `local`:\n\n```lua\ntoStringAs = (function(radix)\n return function(i)\n local floor, insert = math.floor, table.insert\n n = floor(i) -- writes the global `n`\n ...\n```\n\nEvery call clobbers the global `n` in the Lua environment. It works by accident in isolation, but it is a hidden write to shared state that can corrupt an unrelated `n` (or be corrupted by one in a reentrant call). The fix is a one-word `local n = floor(i)`.\n\nLow severity, but worth a release since it is a latent correctness trap. Found while auditing the FFI forks for Lua 5.1 issues.\n","author":{"url":"https://github.com/Unisay","@type":"Person","name":"Unisay"},"datePublished":"2026-06-13T07:14:02Z","url":"https://github.com/purescript-lua/purescript-lua/issues/51"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f1224526-9da2-c524-f087-0b408e5aaedb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC70:38C5CF:AC9392:DF8A40:6B00E453 |
| html-safe-nonce | 5440e48cbbe0159f2fce44f0527f5b8f3b7d88efb1e5f5ad661c9f4fb5c57341 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzcwOjM4QzVDRjpBQzkzOTI6REY4QTQwOjZCMDBFNDUzIiwidmlzaXRvcl9pZCI6IjY4NjA1OTI1NzExMTU2OTQ5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 089c4e841cdee2b002b75c4b0127b7ce7c3631b827babf94c671cf1a0ffdb35f |
| hovercard-subject-tag | issue:4654707799 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript-lua/purescript-lua/51/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5dc38c9e47723896d208e31464d8fe0d15d8711841c926ad5315d321d56ef2d/purescript-lua/purescript-lua/issues/51 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5dc38c9e47723896d208e31464d8fe0d15d8711841c926ad5315d321d56ef2d/purescript-lua/purescript-lua/issues/51 |
| og:image:alt | purescript-lua-integers issues are disabled, so filing here. In src/Data/Int.lua, toStringAs assigns to n without declaring it local: toStringAs = (function(radix) return function(i) local floor, i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Unisay |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript-lua/purescript-lua git https://github.com/purescript-lua/purescript-lua.git |
| octolytics-dimension-user_id | 131581790 |
| octolytics-dimension-user_login | purescript-lua |
| octolytics-dimension-repository_id | 587200487 |
| octolytics-dimension-repository_nwo | purescript-lua/purescript-lua |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 587200487 |
| octolytics-dimension-repository_network_root_nwo | purescript-lua/purescript-lua |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width