Browse Source
Merge pull request #1951 from svaarala/fix-clang-sanitize-warning
Fix a few clang sanitize warnings
pull/1952/merge
Sami Vaarala
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
4 additions and
3 deletions
-
RELEASES.rst
-
src-input/duk_bi_string.c
-
src-input/duk_js_compiler.c
|
|
@ -3379,7 +3379,8 @@ Planned |
|
|
|
|
|
|
|
* Fix harmless -Wcast-align warnings on armhf (GH-1793) |
|
|
|
|
|
|
|
* Various compiler warning fixes (GH-1788, GH-1932, GH-1924, GH-1950, etc) |
|
|
|
* Various compiler warning fixes (GH-1788, GH-1932, GH-1924, GH-1950, |
|
|
|
GH-1951, etc) |
|
|
|
|
|
|
|
* Add automatic workaround for union aliasing issues with FreeBSD + -m32 + |
|
|
|
Clang prior to 5.0; the aliasing issues cause packed duk_tval to work |
|
|
|
|
|
@ -1512,7 +1512,7 @@ DUK_INTERNAL duk_ret_t duk_bi_string_prototype_startswith_endswith(duk_hthread * |
|
|
|
|
|
|
|
if (duk_is_undefined(thr, 1)) { |
|
|
|
if (magic) { |
|
|
|
p_cmp_start += DUK_HSTRING_GET_BYTELEN(h) - blen_search; |
|
|
|
p_cmp_start = p_cmp_start + DUK_HSTRING_GET_BYTELEN(h) - blen_search; |
|
|
|
} else { |
|
|
|
/* p_cmp_start already OK */ |
|
|
|
} |
|
|
|
|
|
@ -4562,7 +4562,7 @@ DUK_LOCAL void duk__expr_led(duk_compiler_ctx *comp_ctx, duk_ivalue *left, duk_i |
|
|
|
* one instruction, so use explicit PC computation. |
|
|
|
*/ |
|
|
|
DUK_DD(DUK_DDPRINT("rhs is side effect free, rewind and avoid unnecessary temp for reg-based <op>=")); |
|
|
|
DUK_BW_ADD_PTR(comp_ctx->thr, &comp_ctx->curr_func.bw_code, (duk_size_t) (pc_temp_load - pc_before_rhs) * sizeof(duk_compiler_instr)); |
|
|
|
DUK_BW_ADD_PTR(comp_ctx->thr, &comp_ctx->curr_func.bw_code, (pc_temp_load - pc_before_rhs) * (duk_int_t) sizeof(duk_compiler_instr)); |
|
|
|
reg_src = reg_varbind; |
|
|
|
} else { |
|
|
|
DUK_DD(DUK_DDPRINT("rhs evaluation emitted code, not sure if rhs is side effect free; use temp reg for LHS")); |
|
|
|