[pull] master from ruby:master#1132
Merged
Merged
Conversation
…PENDING as the new JRuby parser successfully parsed those files. ruby/json@e954a6fe4e
This is intended to make it easier to securely parse untrusted inputs. ruby/json@21c2bbea1c
… error Fix: ruby/json#1022 They can't always be accurate because we don't always keep the full document in the buffer. As such it's better never to compute them than to sometimes provide wrong coordinates. In theory we could keep the number of lines since the start of the parse, but that's more book keeping for little utility. Anyway, these are useful to find a syntax error in a file, not so much in a stream of documents. ruby/json@b2372115af
…ound or converting to st_table * While perusing code in hash.c I found it suspicious that ar_find_entry_hint() didn't reread bound in the loop and yet called arbitrary code through #eql?. * ar_find_entry_hint() before this commit would not check if bound or the storage (AR->ST) changed and would return a bin index which is not correct to access. * Check bound in the loop so it's always up-to-date. * Return RHASH_AR_TABLE_CONVERTED_TO_ST_TABLE when converted to st_table and make callers retry the operation as a st_table. [Bug #22120] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* The macros would expand `ptr` 3 times which could cause extra reads. * We had reports of many segfaults in this area (e.g. DataDog/dd-trace-rb#5718). Even though the code before looks correct semantically, this makes it definitely OK and much easier to follow, by reading fields from the entry only once and not touching the entry after #eql? has returned. The entry can be a pointer to free'd memory if the table was rebuilt during #eql?. * Separate functions for st_table and set_table avoid unsafe casts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If `load-relative` is specified, the system uses `dladdr` to locate the executable file path when initializing the load path; however, on some platforms (at least OpenBSD), `dladdr` fails under certain conditions (such as when debug information is missing). In that case, the system falls back to using `argv[0]`; however, if this is a relative path, the executable cannot be found after changing the working directory with the `-C` option, resulting in an error.
Since the exception will be swallowed, building a message and backtrace is just a waste of time. ruby/json@4bd1e9bce6
Somehow on TruffleRuby `rb_catch_obj` straight out doesn't call the passed function, acting as a noop. ruby/json@9d8efcb08b
Fix: ruby/json#1016 (comment) `json` takes option hashes across the board, mostly because its API predates the introduction of keyword arguments. I'd like to change that to only take keyword arguments and error when an unknown argument is passed, but I'm not yet sure of the backward compatibility consequences, so it might wait for the next major. But in the meantime, `ResumableParser` being a new API, it can safely use keyword arguments. ruby/json@f08c66338c
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )