You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Donny9 (via GitHub)" <gi...@apache.org> on 2023/08/21 13:14:28 UTC

[GitHub] [nuttx] Donny9 opened a new pull request, #10337: libs/ctype/toupper_l: Implement function toupper_l instead of macro

Donny9 opened a new pull request, #10337:
URL: https://github.com/apache/nuttx/pull/10337

   
   ## Summary
   libs/ctype/toupper_l: Implement function toupper_l instead of macro.
   Use functions instead of macros to solve recursive execution problems
   toupper_l will be replaced by toupper, resulting in infinite recursion, so implement toupper_l
   
   crash stack:
   ```
   0  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231 
   1  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667 
   2  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231 
   3  0x005b8188 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667 
   4  std::__1::ctype_byname<char>::do_toupper (this=0xf3888120, c=49 '1') at libcxx/src/locale.cpp:1231 
   5  0x0064cfc9 in std::__1::ctype<char>::toupper (__c=49 '1', this=0xf3888120) at nuttx/include/libcxx/__locale:667 
   6  std::__1::__scan_keyword<char*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*, std::__1::ctype<char> > (__b=@0xf38871a0: 0xf3887220 "11:55:59 PM",
      __e=0xf388722b "", __kb=0xf2c03990, __ke=0xf2c03a38, __ct=..., __err=@0xf38871b0: 0, __case_sensitive=false) at nuttx/include/libcxx/locale:299
   7  0x005cb0ed in std::__1::__time_get_storage<char>::__analyze (this=0xf2c0398c, fmt=114 'r', ct=...) at libcxx/src/locale.cpp:4998 
   8  0x005cf888 in std::__1::__time_get_storage<char>::init (this=0xf2c0398c, ct=...) at libcxx/src/locale.cpp:5295 
   9  0x005d4d0f in std::__1::__time_get_storage<char>::__time_get_storage (this=0xf2c0398c, __nm=...) at libcxx/src/locale.cpp:5399 
   10 0x005b15c8 in std::__1::time_get_byname<char, std::__1::istreambuf_iterator<char, std::__1::char_traits<char> > >::time_get_byname (__refs=0, __nm=..., this=0xf2c03980)
      at nuttx/include/libcxx/locale:2446
   11 std::__1::locale::__imp::__imp (this=0xf2803970, name=..., refs=0) at libcxx/src/locale.cpp:268 
   12 0x005b333e in std::__1::locale::locale (this=0xf3888f00, name=0x6ca340 "C") at libcxx/src/locale.cpp:562 
   13 0x0058313b in helloxx_main (argc=1, argv=0xf3878810) at helloxx_main.cxx:112 
   14 0x0048471a in nxtask_startup (entrypt=0x5830a0 <helloxx_main(int, char**)>, argc=1, argv=0xf3878810) at sched/task_startup.c:70 15 0x00431bcd in nxtask_start () at task/task_start.c:134 16 0x0048f643 in pre_start () at sim/sim_initialstate.c:52 17 0x00000000 in ?? ()
   ```
   ## Impact
   
   ## Testing
   test code:
   ```
   extern "C" int main(int argc, FAR char *argv[])
   {
     std::locale loc {"C"};
     return 0;
   }
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #10337: libs/ctype/toupper_l: Implement function toupper_l instead of macro

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10337:
URL: https://github.com/apache/nuttx/pull/10337


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org