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

Crash when doing 'create-period' #2

Closed
ac000 opened this issue Aug 10, 2021 · 0 comments
Closed

Crash when doing 'create-period' #2

ac000 opened this issue Aug 10, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ac000
Copy link
Owner

ac000 commented Aug 10, 2021

$ ./itsa create-period 
[INFO] ***
[INFO] *** Using TEST API
[INFO] ***

AddressSanitizer:DEADLYSIGNAL
=================================================================
==42598==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f1995eb9715 bp 0x7ffd27b8dd90 sp 0x7ffd27b8d528 T0)
==42598==The signal is caused by a READ memory access.
==42598==Hint: address points to the zero page.
    #0 0x7f1995eb9715 in __strlen_avx2 (/lib64/libc.so.6+0x160715)
    #1 0x7f19960ea8a1 in strdup (/lib64/libasan.so.6+0x598a1)
    #2 0x557d224244ef in get_period /home/andrew/programming/itsa/src/itsa.c:1656
    #3 0x557d224244ef in create_period /home/andrew/programming/itsa/src/itsa.c:1674
    #4 0x557d224244ef in dispatcher /home/andrew/programming/itsa/src/itsa.c:2277
    #5 0x557d224244ef in main /home/andrew/programming/itsa/src/itsa.c:2346
    #6 0x7f1995d80b74 in __libc_start_main (/lib64/libc.so.6+0x27b74)
    #7 0x557d22425a7d in _start (/home/andrew/programming/itsa/src/itsa+0x5a7d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib64/libc.so.6+0x160715) in __strlen_avx2
==42598==ABORTING

gdb backtrace

(gdb) bt full
#0  __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
No locals.
#1  0x00007f953bfb8183 in __GI___strdup (s=0x0) at strdup.c:41
        len = <optimized out>
        new = <optimized out>
#2  0x0000560a7b6f54f0 in get_period (end=<synthetic pointer>, 
    start=<synthetic pointer>) at itsa.c:1656
        met = <optimized out>
        start_obj = 0x0
        end_obj = 0x0
        err = <optimized out>
        result = 0x560a7c755140
        obs = <optimized out>
        period = <optimized out>
        index = <optimized out>
        jbuf = 0x560a7c7744a0 "[\n    {\n        \"status_code\": 200,\n        \"status_str\": \"OK\",\n        \"url\": \"https://test-api.service.hmrc.gov.uk/obligations/details/MZ200944B/income-and-expenditure\",\n        \"method\": \"GET\",\n   "...
        result = <optimized out>
        obs = <optimized out>
        period = <optimized out>
        index = <optimized out>
        jbuf = <optimized out>
        err = <optimized out>
        out_free = <optimized out>
        met = <optimized out>
        start_obj = <optimized out>
        end_obj = <optimized out>
#3  create_period () at itsa.c:1674
        start = 0x0
        end = 0x0
        ret = 0
        err = <optimized out>
        start = <optimized out>
        end = <optimized out>
        ret = <optimized out>
        err = <optimized out>
#4  dispatcher (cfg=0x7fff4c65f840, argv=<optimized out>, argc=2)
    at itsa.c:2277
No locals.
#5  main (argc=2, argv=<optimized out>) at itsa.c:2346
        err = <optimized out>
        ret = 0
        flags = <optimized out>
        config_dir = "/home/andrew/.config/itsa", '\000' <repeats 2799 times>...
        log_level = 0x0
        fph_ops = {
          fph_device_id = 0x0,
          fph_user = 0x0,
          fph_tz = 0x0,
          fph_ipaddrs = 0x0,
          fph_ipaddrs_ts = 0x0,
          fph_macaddrs = 0x0,
          fph_srcip = 0x0,
          fph_srcip_ts = 0x0,
          fph_srcport = 0x0,
          fph_screens = 0x0,
          fph_window_sz = 0x0,
          fph_browser_plugins = 0x0,
          fph_browser_js_ua = 0x0,
          fph_browser_dnt = 0x0,
          fph_vendor_ip = 0x0,
          fph_vendor_fwd = 0x0,
          fph_ua = 0x0,
          fph_multi_factor = 0x0,
          fph_license_id = 0x0,
          fph_version = 0x0,
          fph_version_cli = 0x560a7b6f7150 <set_ver_cli>,
          fph_prod_name = 0x560a7b6f7140 <set_prod_name>,
          user_data = 0x0
        }
        cfg = {
          fph_ops = 0x7fff4c65f910,
          extra_hdrs = 0x560a7b6ff0a0 <extra_hdrs>,
          config_dir = 0x7fff4c65fad0 "/home/andrew/.config/itsa"
        }
(gdb) 
@ac000 ac000 added the bug Something isn't working label Aug 10, 2021
@ac000 ac000 self-assigned this Aug 10, 2021
@ac000 ac000 closed this as completed in 34bf36d Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant