Age | Commit message (Collapse) | Author |
|
When mmap fails for any reason, the fd must be closed.
Coverity Scan found this issue.
https://github.com/ruby/prism/commit/c06e9c400f
|
|
https://github.com/ruby/prism/commit/4ed7de537b
|
|
https://github.com/ruby/prism/commit/d68ea29d04
Notes:
Merged: https://github.com/ruby/ruby/pull/11497
|
|
https://github.com/ruby/prism/commit/487f0ffe78
|
|
https://github.com/ruby/prism/commit/31154a389a
|
|
https://github.com/ruby/prism/commit/89c22f0e6c
|
|
memory-mapped files
> ..., and on other POSIX systems we'll use `read`.
As `pm_string_mapped_init`'s doc comment says, it should fall back to
`read(2)`-based implementation on platforms without memory-mapped files
like WASI, but it didn't. This commit fixes it by calling `pm_string_file_init`
in the fallback case.
Also `defined(_POSIX_MAPPED_FILES)` check for `read(2)`-based path is
unnecessary, and it prevents the fallback from being executed, so this
change removes it.
https://github.com/ruby/prism/commit/b3d9064b71
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/11196
|
|
https://github.com/ruby/prism/commit/283938ed1f
|
|
https://github.com/ruby/prism/commit/97f838c323
|
|
https://github.com/ruby/prism/commit/62d4376a53
|
|
- Add `x` prefix to malloc, calloc, realloc, and free
(eg: malloc -> xmalloc)
- By default, they are replaced with stdlib's functions at build
- You can use custom functions by defining `PRISM_CUSTOM_ALLOCATOR` macro
https://github.com/ruby/prism/commit/7a878af619
|
|
interface is available in the target platform
https://github.com/ruby/prism/commit/88e2ff52d4
|
|
https://github.com/ruby/prism/commit/851f2571ff
|
|
This PR implements proper file parsing error handling. Previously
`file_options` would call `pm_string_mapped_init` which would print an
error from `perror`. However this wouldn't raise a proper Ruby error so
it was just a string output. I've done the following:
- Raise an error from `rb_syserr_fail` with the filepath in
`file_options`.
- No longer return `Qnil` if `file_options` returns false (because now
it will raise)
- Update `file_options` to return `static void` instead of `static
bool`.
- Update `file_options` and `profile_file` to check the type so when
passing `nil` we see a `TypeError`.
- Delete `perror` from `pm_string_mapped_init`
- Update `FFI` backend to raise appropriate errors when calling
`pm_string_mapped_init`.
- Add tests for `dump_file`, `lex_file`, `parse_file`,
`parse_file_comments`, `parse_lex_file`, and `parse_file_success?`
when a file doesn't exist and for `nil`.
- Updates the `bin/parse` script to no longer raise it's own
`ArgumentError` now that we raise a proper error.
Fixes: ruby/prism#2207
https://github.com/ruby/prism/commit/b2f7494ff5
|
|
https://github.com/ruby/prism/commit/77d4056766
|
|
https://github.com/ruby/prism/commit/bec5ca37a0
|
|
https://github.com/ruby/prism/commit/2b6e661bbc
|
|
|
|
|