<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rt-thread.git/components/libc/posix, branch v5.2.2-beta</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/rt-thread.git/atom/components/libc/posix?h=v5.2.2-beta</id>
<link rel='self' href='http://cgit.235523.xyz/rt-thread.git/atom/components/libc/posix?h=v5.2.2-beta'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/'/>
<updated>2025-10-13T03:45:22Z</updated>
<entry>
<title>fix(stdio): ensure compatibility with newlib &lt;3.4.0 by handling removed __sdidinit (#10791)</title>
<updated>2025-10-13T03:45:22Z</updated>
<author>
<name>loremmoqi</name>
<email>112531644+loremmoqi@users.noreply.github.com</email>
</author>
<published>2025-10-13T03:45:22Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=17a796af24f4c053f4137100f2c9a381efed4cee'/>
<id>urn:sha1:17a796af24f4c053f4137100f2c9a381efed4cee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>RT_TIMER_CTRL_SET_TIME only accept rt_tick_t, pass rt_tick_t instead int/rt_int32_t</title>
<updated>2025-09-24T10:12:36Z</updated>
<author>
<name>Yonggang Luo</name>
<email>luoyonggang@gmail.com</email>
</author>
<published>2025-09-21T17:04:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=66b2bcc080b39750cc69a2f00f0d951f94967712'/>
<id>urn:sha1:66b2bcc080b39750cc69a2f00f0d951f94967712</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Trim trailing spaces of components/libc/posix/io/poll/poll.c</title>
<updated>2025-09-24T10:12:36Z</updated>
<author>
<name>Yonggang Luo</name>
<email>luoyonggang@gmail.com</email>
</author>
<published>2025-09-23T05:55:00Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=78dfa1fd9a49db00153e88a6b06bc3d88afab35e'/>
<id>urn:sha1:78dfa1fd9a49db00153e88a6b06bc3d88afab35e</id>
<content type='text'>
Signed-off-by: Yonggang Luo &lt;luoyonggang@gmail.com&gt;
</content>
</entry>
<entry>
<title>[pthreads] Fix pthread_cond_timedwait lacks timeout wakeup</title>
<updated>2025-07-25T07:35:39Z</updated>
<author>
<name>ChenRuiwei</name>
<email>1982833213@qq.com</email>
</author>
<published>2025-07-07T06:35:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=f9564d4ee0d9105ca52245d38e6a7ffaea4d7fb9'/>
<id>urn:sha1:f9564d4ee0d9105ca52245d38e6a7ffaea4d7fb9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[components/libc] add comments for some pthread functions. #10423</title>
<updated>2025-07-24T01:36:31Z</updated>
<author>
<name>Codeman-1999</name>
<email>qianzhongxin19@163.com</email>
</author>
<published>2025-07-24T01:36:31Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=7c0fed5d689bc3244a6b83fdcb4cc211b53b06d8'/>
<id>urn:sha1:7c0fed5d689bc3244a6b83fdcb4cc211b53b06d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix dangling pointer in component pthread and dfs_elm (#9976)</title>
<updated>2025-03-11T02:48:29Z</updated>
<author>
<name>lingfengPeng</name>
<email>uint8_t@163.com</email>
</author>
<published>2025-03-11T02:48:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=29a06142c5e7abfeae5d864892490ccc70f6123f'/>
<id>urn:sha1:29a06142c5e7abfeae5d864892490ccc70f6123f</id>
<content type='text'>
* [components/libc/posix][pthreads]fix the risk of dangling pointer

* [components][dfs][dfs_elm]:fix risk of dangling pointer, unmount the temp driver then free the temp FATFS in dfs_elm_mkfs.</content>
</entry>
<entry>
<title>components: libc: fix pointer-to-integer cast warnings and address truncation</title>
<updated>2025-02-22T19:16:00Z</updated>
<author>
<name>kenneth.liu</name>
<email>kenneth.liu@sophgo.com</email>
</author>
<published>2025-02-22T05:20:11Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=4940bb10515316791f1940a59bfeaeebee35ec87'/>
<id>urn:sha1:4940bb10515316791f1940a59bfeaeebee35ec87</id>
<content type='text'>
[Problem Description]
1. When enabling RT_USING_MODULE=y, compilation warnings occur:
   dlelf.c:386:27: warning: cast from pointer to integer of different size
   dlelf.c:398:25: warning: cast from pointer to integer of different size
   dlelf.c:408:24: warning: cast from pointer to integer of different size

2. On RV64 architectures (e.g. Sophgo SG2042 with RISC-V Sv39 and 40-bit physical addressing),
   dlsym may fail when accessing addresses beyond 32-bit range.

[Root Cause]
In dlmodule_load_relocated_object() and dlmodule_symbol_find(),
pointer is cast to rt_uint32_t which truncates:
| rt_ubase_t rodata_addr = (rt_uint32_t)ptr;
This causes:
- Warnings on 64-bit systems (pointer width &gt; 32-bit)
- Actual address truncation on RV64 when physical address exceeds 32-bit

[Solution]
Replace rt_uint32_t with architecture-adaptive rt_ubase_t:
| rt_ubase_t rodata_addr = (rt_ubase_t)ptr;
The rt_ubase_t is defined in include/rttypes.h as:
| #ifdef ARCH_CPU_64BIT
|   typedef rt_uint64_t rt_ubase_t;
| #else
|   typedef rt_uint32_t rt_ubase_t;
| #endif
This ensures correct width casting for both 32/64-bit architectures.

Signed-off-by: Liu Gui &lt;kenneth.liu@sophgo.com&gt;
</content>
</entry>
<entry>
<title>components: libc: fix array overflow in rt_object name assignment</title>
<updated>2025-02-21T03:38:06Z</updated>
<author>
<name>kenneth.liu</name>
<email>kenneth.liu@sophgo.com</email>
</author>
<published>2025-02-20T12:25:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=a5b26bb588303f7b503156d634e05d21d873a245'/>
<id>urn:sha1:a5b26bb588303f7b503156d634e05d21d873a245</id>
<content type='text'>
[Problem Description]
When assigning name to rt_object, strncpy() uses size equal to RT_NAME_MAX,
which causes missing null-terminator and overflows into adjacent 'type' field.
This corruption leads to unexpected system behavior.

[Problem Analysis]
The rt_object structure defines:
| char name[RT_NAME_MAX] | -&gt; buffer
| rt_uint8_t type        | -&gt; adjacent field

Original code calculates size as:
size = end - first + 1;
if (size &gt; RT_NAME_MAX) size = RT_NAME_MAX;

When size equals RT_NAME_MAX, strncpy() will copy exactly RT_NAME_MAX bytes
without adding terminating '\0', causing two issues:
1. name buffer is not null-terminated
2. The implicit null-byte writes beyond name[] into type field

[Solution]
Change boundary check from:
if (size &gt; RT_NAME_MAX) size = RT_NAME_MAX;
to:
if (size &gt;= RT_NAME_MAX) size = RT_NAME_MAX - 1;

This ensures:
1. Always leaves space for null-terminator
2. Prevents overflow into type field
3. Maintains maximum valid name length (RT_NAME_MAX-1 + '\0')

Signed-off-by: Liu Gui &lt;kenneth.liu@sophgo.com&gt;
</content>
</entry>
<entry>
<title>[components][libc/io]add comments for timer fd APIs.</title>
<updated>2024-12-19T02:07:42Z</updated>
<author>
<name>ligr</name>
<email>liguorui1213@163.com</email>
</author>
<published>2024-12-19T00:41:57Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=1499dbda00b4dc6520fed01e5e81ef5b628e3cff'/>
<id>urn:sha1:1499dbda00b4dc6520fed01e5e81ef5b628e3cff</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[components/libc/posix]add comments for thread local storage APIs.</title>
<updated>2024-11-22T02:46:47Z</updated>
<author>
<name>ligr</name>
<email>liguorui1213@163.com</email>
</author>
<published>2024-11-22T02:15:59Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/rt-thread.git/commit/?id=dd709c1cea4289d841dda413c60e90dbc5ec6193'/>
<id>urn:sha1:dd709c1cea4289d841dda413c60e90dbc5ec6193</id>
<content type='text'>
</content>
</entry>
</feed>
