Skip to content

nocc client hangs on include files that ends with single-line comment containing # #21

@cetygamer

Description

@cetygamer

Setup:

inc.h

No new line at the end of file! a - is the last symbol of the file.

// blabla # blabla

src.c

#include "inc.h"

Commands

nocc-server -log-filename nocc_server.log -log-verbosity 2
NOCC_GO_EXECUTABLE=nocc-daemon NOCC_SERVERS="127.0.0.1:43210" NOCC_LOG_FILENAME=nocc_client.log NOCC_LOG_VERBOSITY=2 nocc gcc -I. -o src.o -c src.c

Result

Client hangs (presumably stuck at analyzing includes).

Logs:

nocc_server.log

2024-04-19 13:11:50 INFO nocc-server started
2024-04-19 13:11:50 INFO env: listenAddr 0.0.0.0:43210 ; ulimit -n 4096 ; num cpu 8 ; version v1.2.1, rev 7510928, compiled at 2024-04-19 10:07:51 UTC
2024-04-19 13:11:57 INFO new client clientID kuWXCYxu version v1.2.1, rev 7510928, compiled at 2024-04-19 10:07:36 UTC ; nClients 1
2024-04-19 13:11:57 INFO new remotes list 1 clientID kuWXCYxu 127.0.0.1

nocc_client.log

2024-04-19 13:11:57 INFO nocc-daemon started in 2 ms
2024-04-19 13:11:57 INFO env: clientID kuWXCYxu ; user user ; num servers 1 ; ulimit -n 4096 ; num cpu 8 ; version v1.2.1, rev 7510928, compiled at 2024-04-19 10:07:36 UTC

Workarounds

  1. Add new line to the end of include file.
  2. Use NOCC_DISABLE_OWN_INCLUDES=1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions