Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed empty string creation in lj_str_new #4

Merged
merged 1 commit into from
Feb 26, 2018
Merged

Fixed empty string creation in lj_str_new #4

merged 1 commit into from
Feb 26, 2018

Conversation

igormunkin
Copy link
Collaborator

Previous implementation of lj_str_new assumes zero value returned from
lua_hash as hash value of an empty string, however there are also
non-empty strings with zero hash value.

Previous implementation of lj_str_new assumes zero value returned from
lua_hash as hash value of an empty string, however there are also
non-empty strings with zero hash value.
@Gerold103
Copy link

The patch seems to be ok.

@Gerold103
Copy link

@kostja

@kostja kostja merged commit 3de8f28 into tarantool:tarantool-1.7 Feb 26, 2018
ligurio added a commit that referenced this pull request Jan 17, 2025
https://github.com/tarantool/luajit/actions/runs/12831238829/job/35781196235

 =================================================================
==765154==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x496949 in realloc (/opt/actions-runner/_work/_temp/build-12831238829/test/tarantool-c-tests/lj-881-fix-lua-concat.c_test+0x496949)
    #1 0x4da87a in lj_mem_realloc /opt/actions-runner/_work/luajit/luajit/src/lj_gc.c:869:7
    #2 0x53f2a8 in lj_ir_growtop /opt/actions-runner/_work/luajit/luajit/src/lj_ir.c:81:23
    #3 0x53f5f1 in lj_ir_nextins /opt/actions-runner/_work/luajit/luajit/src/lj_iropt.h:34:40
    #4 0x53f5f1 in lj_ir_emit /opt/actions-runner/_work/luajit/luajit/src/lj_ir.c:118:15
    #5 0x5cc2ea in lj_record_setup /opt/actions-runner/_work/luajit/luajit/src/lj_record.c:2651:3
    #6 0x5440f0 in trace_state /opt/actions-runner/_work/luajit/luajit/src/lj_trace.c:681:7
    #7 0x58c045 in lj_vm_cpcall /opt/actions-runner/_work/_temp/build-12831238829/src/lj_vm.S:1262

SUMMARY: AddressSanitizer: 256 byte(s) leaked in 1 allocation(s).
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.

3 participants