Changes in / [0982b3ec:c25202b]


Ignore:
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r0982b3ec rc25202b  
    2626                                        gcc_11_x64_new: { trigger_build( 'gcc-11',  'x64', false ) },
    2727//                                      gcc_12_x64_new: { trigger_build( 'gcc-12',  'x64', false ) },
    28 //                                      gcc_10_arm64_new: { trigger_build( 'gcc-10', 'arm64', false ) },
    29 //                                      gcc_11_arm64_new: { trigger_build( 'gcc-11', 'arm64', false ) },
     28                                        gcc_14_x64_new: { trigger_build( 'gcc-14',  'x64', false ) },
     29                                        gcc_10_arm64_new: { trigger_build( 'gcc-10', 'arm64', false ) },
     30                                        gcc_11_arm64_new: { trigger_build( 'gcc-11', 'arm64', false ) },
    3031                                        //gcc_12_arm64_new: { trigger_build( 'gcc-12', 'arm64', false ) },
    3132                                        clang_x64_new:  { trigger_build( 'clang',   'x64', true  ) },
  • Jenkinsfile

    r0982b3ec rc25202b  
    332332                                this.Architecture = new Arch_Desc('x86', '--host=i386', 'x86')
    333333                        break
    334 //                      case 'arm64':
    335 //                              this.Architecture = new Arch_Desc('arm64', '--host=aarch64', 'arm64')
    336 //                      break
     334                        case 'arm64':
     335                                this.Architecture = new Arch_Desc('arm64', '--host=aarch64', 'arm64')
     336                        break
    337337                        default :
    338338                                error "Unhandled architecture : ${arch}"
  • doc/bibliography/pl.bib

    r0982b3ec rc25202b  
    92929292}
    92939293
    9294 @inproceedings{valgind,
     9294@inproceedings{valgrind,
    92959295    keywords    = {Memcheck, Valgrind, dynamic binary analysis, dynamic binary instrumentation, shadow values},
    92969296    contributer = {pabuhr@plg},
  • doc/uC++toCFA/uC++toCFA.tex

    r0982b3ec rc25202b  
    1111%% Created On       : Wed Apr  6 14:53:29 2016
    1212%% Last Modified By : Peter A. Buhr
    13 %% Last Modified On : Mon Nov 17 11:14:48 2025
    14 %% Update Count     : 6677
     13%% Last Modified On : Fri Feb 20 11:19:31 2026
     14%% Update Count     : 6717
    1515%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1616
     
    194194
    195195The @choose@ statement provides an implicit @break@ after the @case@ clause for safety.
    196 It is possible to @break default@ in a @case@ clause to transfer to common code in the @default@ clause.
    197 \begin{cquote}
    198 \begin{tabular}{@{}l|l@{}}
    199 \begin{uC++}
     196It is possible to @fallthrough@ label in a @case@ clause to transfer to common code or the @default@ clause.
     197\begin{cquote}
     198\begin{tabular}{@{}l|l@{}}
     199\begin{cfa}
    200200switch ( i ) {
    201   case 1: ... @break@; // explicit break
    202   case 2: ... @break@; // explicit break
     201  case 3: ... @fallthrough common@;
     202  case 2: if ( ... ) @fallthrough@;
     203  case 1:
     204  common: ... ; // implicit fall through
    203205  default: ... ;
    204206}
    205 \end{uC++}
     207\end{cfa}
    206208&
    207209\begin{cfa}
    208210choose ( i ) {
    209   case 1: ... ; // implicit break
    210   case 2: ... ; // implicit break
     211  case 3: ... @fallthrough common@; // labelled explicit fallthrough
     212  case 2: if ( ... ) @fallthrough@; // conditional explicit fallthrough
     213  case 1:
     214  common: ... ; // implicit break
    211215  default: ... ;
    212216}
     
    250254for ( i; @5@ ~ @15@ ~ @2@ ) { ... } // 5 to 14 by 2
    251255for ( i; -2 ~@=@ 10 ~ 3 ) { ... } // -2 to 10 by 3
    252 for ( i; -3 @-@~ 10 ) { ... } // not 10 -~= -3, 10 to -2 by -1
    253 for ( i; 0 @-@~@=@ 10 ) { ... } // not 10 -~= 0, 10 to 0 by -1
     256for ( i; -3 @-@~ 10 ) { ... } // 10 to -2 by -1, not 10 -~= -3
     257for ( i; 0 @-@~@=@ 10 ) { ... } // 10 to 0 by -1, not 10 -~= 0
    254258\end{cfa}
    255259\end{tabular}
     
    908912  public:
    909913};
     914T t;
     915uProcessor p[3];
    910916\end{uC++}
    911917&
     
    917923};
    918924void main( @T & t@ ) {
    919         ... @resumeAt( partner, ExceptionInst( E, ... )@ );
     925        ... @resumeAt( partner, ExceptionInst( E, ... ) )@;
    920926        ... @active_thread();@ ...
    921927}
    922 \end{cfa}
    923 \\
    924 \multicolumn{2}{@{}l@{}}{\lstinline{T t; // start thread in main routine}}
     928T t;  // create thread object and start thread in main
     929processor p[3]; // 4 kernel threads including program main
     930\end{cfa}
    925931\end{tabular}
    926932\end{cquote}
     
    10091015        }
    10101016};
    1011 enum { N = 3 };
    1012 Barrier b{ N };
     1017Barrier b{ 3 };
    10131018\end{uC++}
    10141019&
     
    10341039        }
    10351040}
    1036 enum { N = 3 };
    1037 Barrier b{ N };
     1041Barrier b{ 3 };
    10381042\end{cfa}
    10391043\end{tabular}
     
    11781182
    11791183
    1180 {\lstset{tabsize=3}
     1184{\lstset{tabsize=4}
    11811185\setlength{\tabcolsep}{5pt}
    11821186\begin{tabular}{@{}l|ll@{}}
     
    11861190@Future_ISM@<double> fd;
    11871191struct Msg { int i, j; }; @Future_ISM@<Msg> fm;
    1188 struct Stop {}; @Future_ISM@<Stop> fs;
    11891192struct Cont {}; @Future_ISM@<Cont> fc;
     1193_Exception Stop {};
    11901194
    11911195_Task Worker {
    11921196        void main() {
    1193 
    1194                 for ( ;; ) {
    1195                         _Select( fi ) { cout << fi() << endl; fi.reset(); }
    1196                         and _Select( fd ) { cout << fd() << endl; fd.reset(); }
    1197                         and _Select( fm ) {
    1198                                 cout << fm().i << " " << fm().j << endl; fm.reset();
    1199                         } or _Select( fs ) { cout << "stop" << endl; break; }
    1200                         fc.delivery( (Cont){} );        // synchronize
    1201                 }
    1202         }
    1203 
     1197                try {
     1198                        for ( ;; ) {
     1199                                _Select( fi ) { cout << fi() << endl; fi.reset(); }
     1200                                and _Select( fd ) { cout << fd() << endl; fd.reset(); }
     1201                                and _Select( fm ) {
     1202                                        cout << fm().i << " " << fm().j << endl; fm.reset();
     1203                                }
     1204                                fc( (Cont){} );         // synchronize
     1205                        }
     1206                } catch( Stop & ) { cout << "stop" << endl;}
     1207        }
    12041208};
    12051209int main() {
    12061210        Worker worker;
    12071211        for ( int i = 0; i < 10; i += 1 ) {
    1208                 fi( i );   fd( i + 2.5 );   fm( (Msg){ i, 2 } ); // fulfil
     1212                fi( i );   fd( i + 2.5 );   fm( (Msg){ i, 2 } );  // fulfil
    12091213                fc(); fc.reset();                               // synchronize
    12101214        }
    1211         fs( (Stop){} );
     1215        fi( new Stop{} );                               // trigger exception
    12121216} // wait for worker to terminate
    12131217\end{uC++}
     
    12151219\begin{cfa}
    12161220#include <future.hfa>
    1217 @future_rc@(int) fi;
    1218 @future_rc@(double) fd;
    1219 struct Msg { int i, j; }; @future_rc@(Msg) fm;
    1220 struct Stop {}; @future_rc@(Stop) fs;
    1221 struct Cont {}; @future_rc@(Cont) fc;
    1222 ExceptionDecl( Break );
     1221@future_rc@( int ) fi;
     1222@future_rc@( double ) fd;
     1223struct Msg { int i, j; }; @future_rc@( Msg ) fm;
     1224struct Cont {}; @future_rc@( Cont ) fc;
     1225ExceptionDecl( Stop );
     1226
    12231227thread Worker {};
    12241228void main( Worker & ) {
     
    12271231                        waituntil( fi ) { sout | fi(); reset( fi ); }
    12281232                        and waituntil( fd ) { sout | fd(); reset( fd ); }
    1229                         and waituntil( fm ) { sout | fm().i | fm().j; reset( fm ); }
    1230                         or waituntil( fs ) { sout | "stop";
    1231                                 throw ExceptionInst( Break );
     1233                        and waituntil( fm ) {
     1234                                sout | fm().i | fm().j; reset( fm );
    12321235                        }
    12331236                        fc( (Cont){} );         // synchronize
    12341237                }
    1235         } catch( Break * ) {}
    1236 }
     1238        } catch( Stop * ) { sout | "stop"; }
     1239}
     1240
    12371241int main() {
    12381242        Worker worker;
    12391243        for ( i; 10 ) {
    1240                 fi( i );   fd( i + 2.5 );   fm( (Msg){ i, 2 } ); // fulfil
     1244                fi( i );   fd( i + 2.5 );   fm( (Msg){ i, 2 } );  // fulfil
    12411245                fc(); reset( fc );              // synchronize
    12421246        }
    1243         fs( (Stop){} );
     1247        fi( ExceptionPtr( ExceptionInst( Stop ) ) );
    12441248} // wait for worker to terminate
    12451249\end{cfa}
  • libcfa/src/concurrency/cofor.cfa

    r0982b3ec rc25202b  
    4444        }
    4545}
    46 
    47 
  • libcfa/src/concurrency/coroutine.cfa

    r0982b3ec rc25202b  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 25 06:48:19 2025
    13 // Update Count     : 31
     12// Last Modified On : Sun Mar  1 17:36:41 2026
     13// Update Count     : 115
    1414//
    1515
     
    326326void ^?{}( ehm_cleanup & this ) { free( this.ex ); }
    327327
     328void * stack_pointer( coroutine$ * cor ) libcfa_public {
     329        if ( active_coroutine() == cor ) {                                      // accessing myself ?
     330                void * sp;                                                                              // use my current stack value
     331                #if defined( __i386__ )
     332                asm( "movl %%esp,%0" : "=m" (sp) : );
     333                #elif defined( __x86_64__ )
     334                asm( "movq %%rsp,%0" : "=m" (sp) : );
     335                #elif defined( __arm_64__ )
     336                asm( "mov x9, sp; str x9,%0" : "=m" (sp) : : "x9" );
     337                #else
     338                        #error Cforall : internal error, unsupported architecture
     339                #endif
     340                return sp;
     341        } else {                                                                                        // accessing another coroutine
     342                return cor->context.SP;
     343        } // if
     344} // stackPointer
     345
     346void * stack_pointer() libcfa_public { return stack_pointer( active_coroutine() ); }
     347
     348#define xstr(s) str(s)
     349#define str(s) #s
     350#define STACK_ERROR 4
     351#define STACK_WARNING 16
     352
     353void stack_verify( coroutine$ * cor ) libcfa_public {
     354        void * sp = stack_pointer( cor );                                       // optimizations
     355        struct __stack_t * cor_stack = __get_stack( cor );
     356        void * safelimit = (void *)((char *)cor_stack->limit + STACK_ERROR * 1024); // space needed for printing abort message and backtrace
     357
     358        if ( sp < safelimit ) {                                                         // must leave stack space to call abort
     359                abort( "Stack overflow detected: stack pointer %p below safe limit %p.\n"
     360                           "Possible cause is allocation of large stack frame(s) and/or deep call stack.",
     361                           sp, safelimit );
     362        } else if ( sp < (void *)((char *)cor_stack->limit + STACK_WARNING * 1024) ) { // must leave stack space to call abort
     363                #define STACK_WARNING_MSG "Cforall Runtime warning : within " xstr(STACK_WARNING) "K of stack limit.\n"
     364                __cfaabi_bits_write( STDERR_FILENO, STACK_WARNING_MSG, sizeof( STACK_WARNING_MSG ) - 1 );
     365        } else if ( sp > cor_stack->base ) {
     366                abort( "Stack underflow detected: stack pointer %p above base %p.\n"
     367                           "Possible cause is corrupted stack frame via overwriting memory.",
     368                           sp, cor_stack->base );
     369        } // if
     370} // verify
     371
     372void stack_verify() libcfa_public { return stack_verify( active_coroutine() ); }
     373
    328374bool poll( coroutine$ * cor ) libcfa_public {
    329375        nonlocal_exception * nl_ex = pop_ehm_head( cor );
     
    351397// user facing ehm operations
    352398forall(T & | is_coroutine(T)) {
     399        void * stack_pointer( T & cor ) libcfa_public { return stack_pointer( get_coroutine( cor ) ); }
     400        void stack_verify( T & cor ) libcfa_public { return stack_verify( get_coroutine( cor ) ); }
     401
    353402        // enable/disable non-local exceptions
    354403        void enable_ehm( T & cor ) libcfa_public { get_coroutine( cor )->ehm_state.ehm_enabled = true; }
  • libcfa/src/concurrency/coroutine.hfa

    r0982b3ec rc25202b  
    1010// Created On       : Mon Nov 28 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 25 06:52:04 2025
    13 // Update Count     : 15
     12// Last Modified On : Sun Mar  1 17:44:11 2026
     13// Update Count     : 43
    1414//
    1515
     
    9898}
    9999
     100void stack_verify( coroutine$ * cor );
     101void stack_verify();
     102
    100103// Private wrappers for context switch and stack creation
    101 // Wrapper for co
    102104static inline void $ctx_switch( coroutine$ * src, coroutine$ * dst ) __attribute__((nonnull (1, 2))) {
    103105        // set state of current coroutine to inactive
     
    110112        /* paranoid */ verify( !athrd->corctx_flag );
    111113        athrd->corctx_flag = true;
     114
     115        #if defined( __CFA_DEBUG__ )
     116        stack_verify( src );                                                            // test on front side of context switch, backside is too late.
     117        #endif // __CFA_DEBUG__
    112118
    113119        // set new coroutine that task is executing
     
    225231
    226232// non local ehm and coroutine utility routines
     233void * stack_pointer( coroutine$ * cor );
     234void * stack_pointer();
    227235void enable_ehm();
    228236void disable_ehm();
     
    234242
    235243forall(T & | is_coroutine(T)) {
     244        void * stack_pointer( T & cor );
     245        void stack_verify( T & cor );
    236246    void enable_ehm( T & cor );         // enable checking non-local exceptions for cor via checked_poll
    237247    void disable_ehm( T & cor );        // disable checking non-local exceptions for cor via checked_poll
  • libcfa/src/concurrency/invoke.h

    r0982b3ec rc25202b  
    1010// Created On       : Tue Jan 17 12:27:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Oct 31 08:46:59 2025
    13 // Update Count     : 67
     12// Last Modified On : Sun Mar  1 15:43:17 2026
     13// Update Count     : 70
    1414//
    1515
     
    3131#define _INVOKE_H_
    3232
    33         enum { DEFAULT_STACK_SIZE = 65000 };
     33        enum { DEFAULT_STACK_SIZE = 256000 };                           // raised from 65000
    3434
    3535        struct __cfaehm_try_resume_node;
  • libcfa/src/concurrency/kernel/startup.cfa

    r0982b3ec rc25202b  
    474474//-----------------------------------------------------------------------------
    475475// Main thread construction
    476 static void ?{}( coroutine$ & this, current_stack_info_t * info) with( this ) {
     476static void ?{}( coroutine$ & this, current_stack_info_t * info ) with( this ) {
    477477        stack.storage = info->storage;
    478478        with(*stack.storage) {
     
    485485        state = Start;
    486486        starter = 0p;
    487         this.last = 0p;
     487        this.last = 0p;                                                                         // "last" overloaded in scope => qualification
    488488        cancellation = 0p;
    489489        ehm_state.ehm_buffer{};
     
    492492}
    493493
    494 static void ?{}( thread$ & this, current_stack_info_t * info) with( this ) {
     494static void ?{}( thread$ & this, current_stack_info_t * info ) with( this ) {
    495495        ticket = TICKET_RUNNING;
    496496        state = Start;
  • libcfa/src/concurrency/preemption.cfa

    r0982b3ec rc25202b  
    1010// Created On       : Mon Jun 5 14:20:42 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Apr 25 07:24:39 2025
    13 // Update Count     : 63
     12// Last Modified On : Sun Mar  1 10:00:18 2026
     13// Update Count     : 68
    1414//
    1515
     
    571571        __cfaabi_dbg_print_buffer_decl( " KERNEL: preempting core %p (%p @ %p).\n", __cfaabi_tls.this_processor, __cfaabi_tls.this_thread, (void *)(cxt->uc_mcontext.CFA_REG_IP) );
    572572
     573        #if defined( __CFA_DEBUG__ )
     574        stack_verify();                                                                         // good place to check for stack overflow
     575        #endif // __CFA_DEBUG__
     576
    573577        // Sync flag : prevent recursive calls to the signal handler
    574578        __cfaabi_tls.preemption_state.in_progress = true;
     
    591595        #endif
    592596
    593         force_yield( __ALARM_PREEMPTION ); // Do the actual __cfactx_switch
     597        force_yield( __ALARM_PREEMPTION );                                      // Do the actual __cfactx_switch
    594598}
    595599
  • libcfa/src/stdhdr/math.h

    r0982b3ec rc25202b  
    1010// Created On       : Mon Jul  4 23:25:26 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun  6 06:35:49 2025
    13 // Update Count     : 24
     12// Last Modified On : Sun Feb  8 22:03:48 2026
     13// Update Count     : 25
    1414//
    1515
    1616extern "C" {
    17 #if ! defined( exception )                                                              // nesting ?
    18 //#define exception ``exception                                                 // make keyword an identifier
    19 #define __CFA_MATH_H__
    20 #endif
    21 
    2217#include_next <math.h>                                                                  // has internal check for multiple expansion
    23 
    24 #if defined( exception ) && defined( __CFA_MATH_H__ )   // reset only if set
    25 //#undef exception
    26 #undef __CFA_MATH_H__
    27 #endif
    2818} // extern "C"
    2919
Note: See TracChangeset for help on using the changeset viewer.