Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2023-03-22
16:51
Merge trunk 1997f71246: Fix [b4af93cd9f]: uninitialized bytes in http11-1.13.0. check-in: 972b6a856a user: pooryorick tags: unchained
2023-03-08
13:42 • Ticket [b4af93cd9f] uninitialized bytes in http11-1.13.0 status still Closed... artifact: 73960fa184 user: dgp
2023-03-07
20:11 • Closed ticket [b4af93cd9f]. artifact: e0506be233 user: jan.nijtmans
20:09
Fix [b4af93cd9f]: uninitialized bytes in http11-1.13.0 check-in: 2dff4cb44b user: jan.nijtmans tags: core-8-branch
01:41 • Ticket [b4af93cd9f] uninitialized bytes in http11-1.13.0 status still Open w... artifact: b6bdf075f8 user: apnadkarni
2023-03-06
18:18 • Ticket [b4af93cd9f]: 3 changes artifact: 17a4aaef16 user: dgp
18:17
[b4af93cd9f] Proposed fix from apnadkarni. It works! closed check-in: cb97451374 user: dgp tags: bug-b4af93cd9f
17:57 • Ticket [b4af93cd9f] uninitialized bytes in http11-1.13.0 status still Open w... artifact: 4100e9208f user: apnadkarni
17:34 • Ticket [b4af93cd9f]: 3 changes artifact: ca568fa4d8 user: dgp
17:30 • New ticket [b4af93cd9f]. artifact: e19649bad1 user: dgp

uninitialized bytes in http11-1.13.0

Closed / Fixedb4af93cd9f5ccb360167005b9637f89c335d309aCreated 4 years agoUpdated 4 years ago
Descriptionplain2023-03-06 17:30:50
valgrind run reports uninitialized bytes usage in http11-1.13.0:

==26164== Syscall param socketcall.getsockopt(optlen) points to uninitialised byte(s)
==26164==    at 0x586E8EA: getsockopt (in /usr/lib64/libc-2.17.so)
==26164==    by 0x5D4D28: TcpGetOptionProc (tclUnixSock.c:1045)
==26164==    by 0x5468A6: Tcl_GetChannelOption (tclIO.c:8144)
==26164==    by 0x54D074: Tcl_FconfigureObjCmd (tclIOCmd.c:785)
==26164==    by 0x434E1F: Dispatch (tclBasic.c:4997)
==26164==    by 0x434EA7: TclNRRunCallbacks (tclBasic.c:5037)
==26164==    by 0x434773: Tcl_EvalObjv (tclBasic.c:4756)
==26164==    by 0x436DD5: TclEvalEx (tclBasic.c:5913)
==26164==    by 0x559F7D: Tcl_FSEvalFileEx (tclIOUtil.c:1782)
==26164==    by 0x5669A6: Tcl_MainEx (tclMain.c:405)
==26164==    by 0x410188: main (tclAppInit.c:94)
==26164==  Address 0x1ffeffe6bc is on thread 1's stack
==26164==  in frame #1, created by TcpGetOptionProc (tclUnixSock.c:900)
Referenced by3
dgpplain2023-03-06 17:34:18
Very likely same issue exposed by test socket_inet-7.3:

==26857== Syscall param socketcall.getsockopt(optlen) points to uninitialised byte(s)
==26857==    at 0x586E8EA: getsockopt (in /usr/lib64/libc-2.17.so)
==26857==    by 0x5D4D28: TcpGetOptionProc (tclUnixSock.c:1045)
==26857==    by 0x5468A6: Tcl_GetChannelOption (tclIO.c:8144)
==26857==    by 0x54D074: Tcl_FconfigureObjCmd (tclIOCmd.c:785)
==26857==    by 0x434E1F: Dispatch (tclBasic.c:4997)
==26857==    by 0x434EA7: TclNRRunCallbacks (tclBasic.c:5037)
==26857==    by 0x434773: Tcl_EvalObjv (tclBasic.c:4756)
==26857==    by 0x436DD5: TclEvalEx (tclBasic.c:5913)
==26857==    by 0x559F7D: Tcl_FSEvalFileEx (tclIOUtil.c:1782)
==26857==    by 0x5669A6: Tcl_MainEx (tclMain.c:405)
==26857==    by 0x410188: main (tclAppInit.c:94)
==26857==  Address 0x1ffeffe70c is on thread 1's stack
==26857==  in frame #1, created by TcpGetOptionProc (tclUnixSock.c:900)
apnadkarnimarkdown2023-03-06 17:57:50

Most likely because size needs to be initialized to sizeof(opt) before the call to getsockopt on line 1045.

dgpplain2023-03-06 18:18:31
Thanks.  That does seem to fix it.  Fix committed to a branch.  If it looks
ok to you, either merge it, or tell me I should merge it.
apnadkarniplain2023-03-07 01:41:05
Please go ahead and merge it. Thanks
jan.nijtmanswiki2023-03-07 20:11:09

Fixed [here]

dgpplain2023-03-08 13:42:04
Thanks!
Log in (anonymous is fine) to add a comment.