Search found 3246 matches

by coderJeff
Mar 23, 2024 18:06
Forum: Documentation
Topic: SmartPointer_UDTname_ segmentation violation
Replies: 10
Views: 367

Re: SmartPointer_UDTname_ segmentation violation

Otherwise I had already seen another configuration which presents the same behavior: Your example is better for debugging. Thank you. I believe the logic is here: ast-node-arg.bas#L869 1) If we are passing to a byval parameter, then check if there is a constructor that would work (assumption at thi...
by coderJeff
Mar 23, 2024 15:56
Forum: Documentation
Topic: SmartPointer_UDTname_ segmentation violation
Replies: 10
Views: 367

Re: SmartPointer_UDTname_ segmentation violation

I will try to isolate/simplify this abnormal behavior, but it will not be immediate because the code is quite complex. Here is the shortest I found so far. Try fbc-1.10+ with 'SHOW_CHANGE = true|false'. When SHOW_CHANGE=true, fbc-1.10+ assigns the result of CAST() as ROOT ptr to a temporary variabl...
by coderJeff
Mar 23, 2024 14:19
Forum: General
Topic: -gen clang
Replies: 56
Views: 2195

Re: -gen clang

Thank you srvaldez & deltarho
by coderJeff
Mar 23, 2024 14:00
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

(to be removed in fbc version 1.20.0 ?) Seems like something could be improved here and need to investigate what is going on in the rtlib: - rtrim( string ) - rtrim( string, filter ) - rtrim( string, any filter ) The test-suite has some tests for [L|R]TRIM, however does not specifically test behavi...
by coderJeff
Mar 22, 2024 12:38
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

BUG #3 with new STRING*N LSET and RSET overflow the fix-len string field by always writing a null ubyte just after the last character of the fix-len string. I assume LSET and RSET have not been updated for the new STRING*N . Yes, not updated. I forget about these statements. For interest, some thin...
by coderJeff
Mar 15, 2024 14:01
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

It would remain to be decided whether the case 's2' declared in a UDT always generates constructor code (regardless of other member data), like the case 's3' . I would like to try keep the optimization for now even though it currently gives a more complicated rule. Ideally, the underlying implement...
by coderJeff
Mar 15, 2024 12:40
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

Perhaps a generalization due to the final padding with null characters on the right side of the old STRING*N (fbc version 1.10.0): (to be removed in fbc version 1.20.0 ?) Seems like something could be improved here and need to investigate what is going on in the rtlib: - rtrim( string ) - rtrim( st...
by coderJeff
Mar 12, 2024 0:42
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

Does anyone know the reason for this ? https://github.com/freebasic/fbc/blob/da8f14569e2786e11b3e66371f39ecf306da3663/src/rtlib/str_hskip.c#L23 /* fixed-len's are filled with null's as in PB, strip them too */ while( (--len >= 0) && (((int)*p == c) || ((int)*p == 0) ) ) --p; I think this co...
by coderJeff
Mar 12, 2024 0:31
Forum: Linux
Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
Replies: 21
Views: 1937

Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?

sed ... I believe all the other uses for "lib" are for naming output files, e.g. "lib" + "SOMENAME" + ".a", etc. I can see how would seem to work ok when producing an executable only. so definitively gcc 13 changed something. Yes, I think default is a newer s...
by coderJeff
Mar 10, 2024 15:38
Forum: Linux
Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
Replies: 21
Views: 1937

Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?

in fact I have to changed the hard coded path of the library directory The 'sed' expression is aggressive. It's going to replace "lib" -> "lib64" even in places where it should not be replaced. I think I see now (maybe): - The bootstrap package is partially compiled sources (ess...
by coderJeff
Mar 10, 2024 15:12
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

On this occasion, I just noticed that the following code did not trigger the following error message from the compiler: Dim As String * 20 array() Redim As String * 10 array(0) '' no error ! This seems familiar - maybe something to do with passing array arguments? but I can't quite place it. Perhap...
by coderJeff
Mar 09, 2024 21:50
Forum: Linux
Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
Replies: 21
Views: 1937

Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?

Hmm, the build process looks pretty good.

Was there a version of gcc & binutils that worked in the past?

I'm not sure what to suggest next.
by coderJeff
Mar 09, 2024 21:18
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

But if we ensure that our starting buffer is large enough to handle the assignment, here's the expected changes for VARIABLES if string*n and zstring*n and wstring*n passed to byref as string is allowed to be modified: When the starting buffer is not large enough to handle such a assignment (passin...
by coderJeff
Mar 09, 2024 17:27
Forum: Linux
Topic: FreeBASIC broken following OS upgrade; generates problematic .asm files...?
Replies: 21
Views: 1937

Re: FreeBASIC broken following OS upgrade; generates problematic .asm files...?

here is the relevant part. The C compiler is gcc 13.1.1 (clang doesn't work). What version is the fbc bootstrap compiler? Normally I would not copy over the bootstrap compiler to ./bin, but maybe I don't understand what steps you are following or what script this is from. ... nevermind, I looked mo...
by coderJeff
Mar 09, 2024 13:31
Forum: Community Discussion
Topic: Freebasic 1.20.0 Development
Replies: 227
Views: 20513

Re: Freebasic 1.20.0 Development

I will come back to this code when bugs #1 and #2 are fixed. I have fixes for bug #1 and #2 which I should be able to push out today. I started to explore enabling copyback for string*n and zstring*n passed to byref as string. And got side tracked by already existing and unsafe combinations of impl...