FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixes #8948. SassC - array size too big by enebo · Pull Request #8950 · jruby/jruby · GitHub

/ jruby Public

Fixes #8948. SassC - array size too big - #8950

Merged
enebo merged 1 commit into
jruby:masterfrom
enebo:topic/fix_8948
Aug 7, 2025
Merged

Fixes #8948. SassC - array size too big#8950
enebo merged 1 commit into
jruby:masterfrom
enebo:topic/fix_8948

Conversation

enebo commented Aug 7, 2025

Copy link
Copy Markdown
Member

At some point during JRuby 10 we decided to pre-alloc get_array_of_string. Later JRuby API changes made it appear like those new APIs caused this but it was pre-alloc.

The problem is sassc (or FFI) decides to ask for an array or strings and the size of the memory alloced is MAX_LONG (big question on why unrelated to this issue). get_array_of_strings has an if check for null memory and immediately exits the fill loop and basically makes a zero length array. By pre-allocing we basically do not ever see that this is a small array.

I reverted to using an empty array like 9.4 still does.

At some point during JRuby 10 we decided to pre-alloc
get_array_of_string.  Later JRuby API changes made it appear
like those new APIs caused this but it was pre-alloc.

The problem is sassc (or FFI) decides to ask for an array
or strings and the size of the memory alloced is MAX_LONG (big
question on why unrelated to this issue).  get_array_of_strings
has an if check for null memory and immediately exits the fill
loop and basically makes a zero length array.  By pre-allocing
we basically do not ever see that this is a small array.

I reverted to using an empty array like 9.4 still does.
enebo added this to the JRuby 10.0.2.0 milestone Aug 7, 2025
enebo merged commit f523070 into jruby:master Aug 7, 2025
70 of 72 checks passed
enebo deleted the topic/fix_8948 branch August 7, 2025 15:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL