Overview
| Artifact ID: | 5b5c7a388fcea4df451b36ae627ab4d311b9fe4b9b0c944873a01bdb0992181a |
|---|---|
| Ticket: | f4b0cb208044f175bdd669db0b293d0bf3f9108e
Calling Tcl_GetStringFromObj with NULL lengthPtr causes compile error |
| User & Date: | anticrisis on 2021-01-22 22:38:12 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Code introduced in tclDecls.h to handle 64 bit issues causes sqlite to fail to compile, because the new code does not allow passing NULL as a lengthPtr. Here is a godbolt link to an isolated sample. Note that calling Tcl_GetStringFromObj with 0 as the lengthPtr argument causes a compile error. https://godbolt.org/z/vxzv53 The problem is this, in tclDecls.h: #define Tcl_GetStringFromObj(objPtr, sizePtr) \ (sizeof(*sizePtr) <= sizeof(int) ? tclStubsPtr->tcl_GetStringFromObj(objPtr, (int *)sizePtr) : tclStubsPtr->tclGetStringFromObj(objPtr, (size_t *)sizePtr)) This macro fails if sizePtr is 0, because (*sizePtr) is not valid C code. Documentation for Tcl_GetStringFromObj indicates that sizePtr may be NULL, but this macro does not allow that. - foundin changed to: "core-8-branch"
- is_private changed to: "0"
- login: "anticrisis"
- priority changed to: "5 Medium"
- private_contact changed to: "00d9ff853328848f3f7df354bd59967669224d5d"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "anticrisis"
- subsystem changed to: "- New Stub Entries"
- title changed to: "Cannot compile sqlite against core-8-branch Tcl"
- type changed to: "Bug"