Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

VCL integer literals are (long) int #4431

Description

@nigoroll

Working on #4422 I accidentally stepped on this:

set resp.http.number = 1234123 * 10000;

results in

**** v1    vsl|       1001 RespHeader      c number: -543671888

This is unexpected since VCL_INT is int64_t which, on my machine, has the same size as long long int, but the overflow is to be expected for long int:

(gdb) p 1234123L * 10000L
$1 = -543671888
(gdb) p 1234123LL * 10000LL
$2 = 12341230000
(gdb) p sizeof(long int)
$11 = 4
(gdb) p sizeof(long long int)
$12 = 8

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