Skip to content

Segmentation fault on musl when set big buffer size #108

@dashezup

Description

@dashezup

fiche -B 262144 gives me Segmentation fault while receiving the first upload on Void Linux musl, it works fine on Void Linux glibc so this issue is probably musl only.

[Fiche][STATUS] Starting fiche on Sat Apr  3 06:35:22 2021...
[Fiche][STATUS] Domain set to: http://example.com.
[Fiche][STATUS] Server started listening on port: 9999.
============================================================
[Fiche][STATUS] Sat Apr  3 06:35:27 2021
[Fiche][STATUS] Incoming connection from: 127.0.0.1 (localhost.localdomain).
[1]    18061 segmentation fault  fiche -B 262144

gdb debug log

Thread 2 "fiche" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 23997]
0x00005555555561f5 in handle_connection (args=0x7ffff7ffe320) at fiche.c:565
565         memset(buffer, 0, c->settings->buffer_len);

fiche/fiche.c

Line 565 in 4bba916

memset(buffer, 0, c->settings->buffer_len);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions