I downloaded samba_source, and built everything using -g3
It appears that the static tables
upcase_table, lowcase_table and valid_table
are not initialized: obviously, the functions init_valid_table and load_case_table are never called
_____________________________________________________
[Thread debugging using libthread_db enabled]
[New Thread -1210394944 (LWP 9957)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210394944 (LWP 9957)]
0xb7d39e89 in toupper_w (val=106) at lib/util_unistr.c:385
385 {
(gdb) info locals
No locals.
(gdb) p upcase_table
$1 = (smb_ucs2_t *) 0x0
(gdb) p lowcase_table
$2 = (smb_ucs2_t *) 0x0
(gdb) p load_case_tables::initialised
$4 = 0
________________________________________________________
To fix it, I just added the missing calls to initialization functions in lib/util_unistr.c:
line 423, in BOOL isvalid83_w(smb_ucs2_t c), insert:
init_valid_table();
line 413, in BOOL isupper_w(smb_ucs2_t c), insert:
load_case_tables();
line 404, in BOOL islower_w(smb_ucs2_t c), insert:
load_case_tables();
line 395, in smb_ucs2_t tolower_w( smb_ucs2_t val ), insert:
load_case_tables();
line 386, in smb_ucs2_t toupper_w(smb_ucs2_t val), insert:
load_case_tables();
I downloaded samba_source, and built everything using -g3 _______ _______ _______ _______ _______ _______ ____
It appears that the static tables
upcase_table, lowcase_table and valid_table
are not initialized: obviously, the functions init_valid_table and load_case_table are never called
_______
[Thread debugging using libthread_db enabled]
[New Thread -1210394944 (LWP 9957)]
Program received signal SIGSEGV, Segmentation fault. unistr. c:385 tables: :initialised _______ _______ _______ _______ _______ _______ _______
[Switching to Thread -1210394944 (LWP 9957)]
0xb7d39e89 in toupper_w (val=106) at lib/util_
385 {
(gdb) info locals
No locals.
(gdb) p upcase_table
$1 = (smb_ucs2_t *) 0x0
(gdb) p lowcase_table
$2 = (smb_ucs2_t *) 0x0
(gdb) p load_case_
$4 = 0
_______
To fix it, I just added the missing calls to initialization functions in lib/util_unistr.c:
line 423, in BOOL isvalid83_ w(smb_ucs2_ t c), insert: table() ;
init_valid_
line 413, in BOOL isupper_ w(smb_ucs2_ t c), insert: case_tables( );
load_
line 404, in BOOL islower_ w(smb_ucs2_ t c), insert: case_tables( );
load_
line 395, in smb_ucs2_t tolower_w( smb_ucs2_t val ), insert: case_tables( );
load_
line 386, in smb_ucs2_t toupper_ w(smb_ucs2_ t val), insert: case_tables( );
load_
_______ _______ _______ _______ _______ _______ _______ _
I am not an expert in samba, I don't know if this fix is clean nor how to commit these changes, but it works on my three computers.