Merged
Conversation
8f67890 to
7804942
Compare
aleksisch
commented
Dec 28, 2025
| } else { | ||
| at_function_entry <| $() { | ||
| v_ptr = LLVMBuildAlloca(g_builder, vtype, "variable_{arg.name}") | ||
| LLVMBuildMemSet(g_builder, v_ptr, 0ul, uint64(vsize), uint(valign)) |
Contributor
Author
There was a problem hiding this comment.
@borisbat What do you think, should we init it here? We do so in AOT, but maybe we can add a check related to existance of finally block, since we need initialization apparently only in case:
def test() {
if (true) {
return;
}
let x = new B()
} finally {
unsafe {
delete x
}
}
Collaborator
There was a problem hiding this comment.
can you check if LLVM optimizes this out?
Contributor
Author
There was a problem hiding this comment.
I tried a bunch of examples, with O3, I couldn't find an example when this initialization is not optimized, moreover, LLVM optimizes even alloca call
5bff890 to
e82f22b
Compare
1a3cbce to
4bc7481
Compare
Code in inscope_return_inscope.das contained UB, code like:
```
[sideeffects]
def buggy(skip : bool) {
var a = new Foo
if (skip) {
return
}
var b = new Foo
} finally {
unsafe {
delete a
delete b
}
}
```
Sometimes it crashed, because b is uninitialized and when delete
was called it was treated as initialized.
More specifically it crashed when `daScriptTest` was called with
all the JIT optimizations disabled (LLVM_ENABLE_OPT_PASS=false)
and daslang built in Release or RelWithDebInfo.
Now we can JIT for loops which iterates over strings.
We want to check whether function a jit function even if JIT module is not available, same way we check is_jit_enabled. Let's move is_jit_function to module_builtin_runtime.
We are no longer needed cpp module for JIT at all.
c697018 to
2b8064a
Compare
- Add missed delete - Add nan check, since nan != nan - Remove all JIT related stuff, it's useless with last JIT updates
2b8064a to
668ad93
Compare
UBSAN complains about values in test type_constructors being out of range. This test file was commented until we'll fix this issue.
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
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.
No description provided.