Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Linux Discussion :

Erreur de segmentation [SDL_TTF]


Sujet :

Linux

  1. #1
    Futur Membre du Club
    Erreur de segmentation [SDL_TTF]
    Bonjour

    j'ai un problème lors de l’exécution de mon code, je programme sur rasbian sous nano dans le terminal. Mon programme est censé affiché des chiffres aléatoire sur l'axe des X uniquement
    lors de l'execution j'ai ERREUR DE SEGMENTATION

    voici mon code :


    Code :Sélectionner tout -Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
     
    #include <stdlib.h>
    #include <stdio.h>
    #include <iostream>
    #include <SDL/SDL.h>
    #include <SDL/SDL_ttf.h>
     
     
    using std::cerr;
    using std::endl;
     
    class SystemManager {
        public:
            // Here we will just have a couple public members for example purposes.
            bool running;
            SDL_Event events;
            void inputManager(); // Handle input.
            void renderingManager(); // Handle drawing pretty pictures.
    };
     
    void SystemManager::inputManager() {
        while(SDL_PollEvent(&events)) {
            if(events.type == SDL_QUIT)
                running = false;
        }
    }
     
    void SystemManager::renderingManager() {
        // Draw pretty pictures...
    }
     
    int main( int argc, char *argv[ ] )
    {
        SDL_Surface *screen;
        SystemManager sysMgr;
        sysMgr.running = true;
        int lastrender = 0;
        char* afficher;
        if( SDL_Init( SDL_INIT_JOYSTICK | SDL_INIT_VIDEO ) == -1 )
        {
            printf( "Can't init SDL:  %s\n", SDL_GetError( ) );
            return EXIT_FAILURE;
        }
     
        atexit( SDL_Quit );
        screen = SDL_SetVideoMode( 640, 480, 16, SDL_HWSURFACE );
     
        if( !screen)
        {
            printf( "Can't set video mode: %s\n", SDL_GetError( ) );
            return EXIT_FAILURE;
        }
        if (TTF_Init() != 0)
       {
     cerr << "TTF_Init() Failed: " << TTF_GetError() << endl;
          SDL_Quit();
          exit(1);
       }
     
       // Load a font
       TTF_Font *font;
       font = TTF_OpenFont("angelina.TTF", 24);
       if (font == NULL)
       {
          cerr << "TTF_OpenFont() Failed: " << TTF_GetError() << endl;
          TTF_Quit();
          SDL_Quit();
          exit(2);
       }
     
       // Write text to surface
       SDL_Surface *text;
       SDL_Color text_color;
       text = TTF_RenderText_Solid(font, "1", text_color);
     
       if (text == NULL)
       {
          cerr << "TTF_RenderText_Solid() Failed: " << TTF_GetError() << endl;
          TTF_Quit();
          SDL_Quit();
          exit(1);
       }
     
     }
        SDL_Rect position;
        SDL_Surface *rectangle = NULL;
        rectangle = SDL_CreateRGBSurface(SDL_HWSURFACE, 12, 12, 16, 1, 0, 0, 0);
     
        position.x = screen->w/2;
        position.y = screen->h/2;
        SDL_Event event;
        int val = 0;
     
        while(sysMgr.running)
        {
            val = rand()%9;
        sprintf(afficher, "%d", val);
        printf("%d - %s", val, afficher);
        sysMgr.inputManager();
        sysMgr.renderingManager();
        text_color;
        text = TTF_RenderText_Solid(font,afficher,text_color);
        TTF_SizeText(font,"Hello World!",&val,&val);
        SDL_BlitSurface(text, NULL, screen, &position);
       // SDL_FillRect(rectangle, NULL, SDL_MapRGB(screen->format, 255, 255, 255));
       // SDL_BlitSurface(rectangle, NULL, screen, &position); // Collage de la surface sur l'ecran
     
        SDL_Flip(screen); // Mise a  jour de l'ecran
       // SDL_Delay( 100 );
       // SDL_FillRect(rectangle, NULL, SDL_MapRGB(screen->format, 0, 0, 0));
       // SDL_BlitSurface(rectangle, NULL, screen, &position); // Collage de la surface sur l'ecran
     
     
        SDL_Delay(((rand()%10)*200));
     
        text_color;
        text = TTF_RenderText_Solid(font,afficher,text_color);
        SDL_BlitSurface(text, NULL, screen, &position);
        position.x = rand()%screen->w;
     
                }
     
     
     
      return EXIT_SUCCESS;
     
    }



    Merci pour votre aide

  2. #2
    Futur Membre du Club
    j'ai utliser la soft valgrind voila le resultat si ça peut vous aidez

    Code :Sélectionner tout -Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    583
    584
    585
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
    597
    598
    599
    600
    601
    602
    603
    604
    605
    606
    607
    608
    609
    610
    611
    612
    613
    614
    615
    616
    617
    618
    619
    620
    621
    622
    623
    624
    625
    626
    627
    628
    629
    630
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
    642
    643
    644
    645
    ==6241== Memcheck, a memory error detector
    ==6241== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
    ==6241== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
    ==6241== Command: ./main
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40194A0: index (strchr.S:99)
    ==6241==    by 0x4014377: dl_open_worker (dl-open.c:212)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==    by 0x4B5151F: getaddrinfo (getaddrinfo.c:2426)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40194A4: index (strchr.S:101)
    ==6241==    by 0x4014377: dl_open_worker (dl-open.c:212)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==    by 0x4B5151F: getaddrinfo (getaddrinfo.c:2426)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401437C: dl_open_worker (dl-open.c:213)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==    by 0x4B5151F: getaddrinfo (getaddrinfo.c:2426)
    ==6241==    by 0x525E9AF: ??? (in /usr/lib/arm-linux-gnueabihf/libxcb.so.1.1.0)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40194A0: index (strchr.S:99)
    ==6241==    by 0x4008CF7: _dl_map_object (dl-load.c:2398)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40194A4: index (strchr.S:101)
    ==6241==    by 0x4008CF7: _dl_map_object (dl-load.c:2398)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x4008CFC: _dl_map_object (dl-load.c:2398)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==    by 0x4B5151F: getaddrinfo (getaddrinfo.c:2426)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40197E0: strlen (strlen.S:76)
    ==6241==    by 0x4008DBF: _dl_map_object (dl-load.c:2402)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40197E4: strlen (strlen.S:78)
    ==6241==    by 0x4008DBF: _dl_map_object (dl-load.c:2402)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==    by 0x4B5005F: gaih_inet (getaddrinfo.c:861)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A280: mempcpy (mempcpy.c:33)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x33: ???
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A2A0: memcpy (memcpy.S:63)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0xD: ???
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A2C4: memcpy (memcpy.S:79)
    ==6241==    by 0x7: ???
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A2C4: memcpy (memcpy.S:79)
    ==6241==    by 0x1: ???
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A34C: memcpy (memcpy.S:177)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A350: memcpy (memcpy.S:180)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A354: memcpy (memcpy.S:183)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A358: memcpy (memcpy.S:194)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A36C: memcpy (memcpy.S:208)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A370: memcpy (memcpy.S:210)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A374: memcpy (memcpy.S:212)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x400765B: open_path (dl-load.c:2199)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A2A8: memcpy (memcpy.S:71)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A39C: memcpy (memcpy.S:241)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A3A0: memcpy (memcpy.S:243)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A3C4: memcpy (memcpy.S:337)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A44C: memcpy (memcpy.S:337)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A460: memcpy (memcpy.S:337)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A464: memcpy (memcpy.S:337)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A360: memcpy (memcpy.S:202)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A364: memcpy (memcpy.S:204)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A368: memcpy (memcpy.S:206)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A36C: memcpy (memcpy.S:208)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A36C: memcpy (memcpy.S:208)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A374: memcpy (memcpy.S:212)
    ==6241==    by 0x401A28B: mempcpy (mempcpy.c:34)
    ==6241==    by 0x40076EF: open_path (dl-load.c:2207)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Syscall param open(filename) contains uninitialised byte(s)
    ==6241==    at 0x4018E3C: open (syscall-template.S:81)
    ==6241==    by 0x4006ED3: open_verify (dl-load.c:1930)
    ==6241==    by 0x4007723: open_path (dl-load.c:2216)
    ==6241==    by 0x4008E57: _dl_map_object (dl-load.c:2447)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40197E0: strlen (strlen.S:76)
    ==6241==    by 0x400B55B: _dl_new_object (dl-object.c:62)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x40197E4: strlen (strlen.S:78)
    ==6241==    by 0x400B55B: _dl_new_object (dl-object.c:62)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x4835724: calloc (vg_replace_malloc.c:566)
    ==6241==    by 0x400B5AB: _dl_new_object (dl-object.c:75)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A2A8: memcpy (memcpy.S:71)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A2C8: memcpy (memcpy.S:85)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A320: memcpy (memcpy.S:143)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A320: memcpy (memcpy.S:143)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Use of uninitialised value of size 4
    ==6241==    at 0x401A348: memcpy (memcpy.S:174)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A360: memcpy (memcpy.S:202)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A364: memcpy (memcpy.S:204)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Conditional jump or move depends on uninitialised value(s)
    ==6241==    at 0x401A370: memcpy (memcpy.S:210)
    ==6241==    by 0x400B5DB: _dl_new_object (dl-object.c:87)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==
    ==6241== Invalid read of size 4
    ==6241==    at 0x40197E0: strlen (strlen.S:76)
    ==6241==    by 0x400B6DB: _dl_new_object (dl-object.c:157)
    ==6241==    by 0x4005A5B: _dl_map_object_from_fd (dl-load.c:1059)
    ==6241==    by 0x4008D93: _dl_map_object (dl-load.c:2605)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==  Address 0x57d1a68 is 40 bytes inside a block of size 43 alloc'd
    ==6241==    at 0x4833970: malloc (vg_replace_malloc.c:263)
    ==6241==    by 0x400579B: local_strdup (dl-load.c:162)
    ==6241==    by 0x4008FEB: _dl_map_object (dl-load.c:2509)
    ==6241==    by 0x40143F7: dl_open_worker (dl-open.c:235)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4013D47: _dl_open (dl-open.c:661)
    ==6241==    by 0x4B9DDEB: do_dlopen (dl-libc.c:87)
    ==6241==    by 0x400FE93: _dl_catch_error (dl-error.c:187)
    ==6241==    by 0x4B9DED3: dlerror_run (dl-libc.c:46)
    ==6241==    by 0x4B9DF53: __libc_dlopen_mode (dl-libc.c:163)
    ==6241==    by 0x4B8787B: nss_load_library (nsswitch.c:358)
    ==6241==    by 0x4B88153: __nss_lookup_function (nsswitch.c:466)
    ==6241==
    disInstr(arm): unhandled instruction: 0xF1010200
                     cond=15(0xF) 27:20=16(0x10) 4:4=0 3:0=0(0x0)
    ==6241== valgrind: Unrecognised instruction at address 0x48426f4.
    ==6241==    at 0x48426F4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so)
    ==6241== Your program just tried to execute an instruction that Valgrind
    ==6241== did not recognise.  There are two possible reasons for this.
    ==6241== 1. Your program has a bug and erroneously jumped to a non-code
    ==6241==    location.  If you are running Memcheck and you just saw a
    ==6241==    warning about a bad jump, it's probably your program's fault.
    ==6241== 2. The instruction is legitimate but Valgrind doesn't handle it,
    ==6241==    i.e. it's Valgrind's fault.  If you think this is the case or
    ==6241==    you are not sure, please let us know and we'll try to fix it.
    ==6241== Either way, Valgrind will now raise a SIGILL signal which will
    ==6241== probably kill your program.
    ==6241==
    ==6241== Process terminating with default action of signal 4 (SIGILL)
    ==6241==  Illegal opcode at address 0x48426F4
    ==6241==    at 0x48426F4: ??? (in /usr/lib/arm-linux-gnueabihf/libarmmem.so)
    ==6241==
    ==6241== HEAP SUMMARY:
    ==6241==     in use at exit: 3,043 bytes in 12 blocks
    ==6241==   total heap usage: 61 allocs, 49 frees, 7,069 bytes allocated
    ==6241==
    ==6241== LEAK SUMMARY:
    ==6241==    definitely lost: 0 bytes in 0 blocks
    ==6241==    indirectly lost: 0 bytes in 0 blocks
    ==6241==      possibly lost: 0 bytes in 0 blocks
    ==6241==    still reachable: 3,043 bytes in 12 blocks
    ==6241==         suppressed: 0 bytes in 0 blocks
    ==6241== Rerun with --leak-check=full to see details of leaked memory
    ==6241==
    ==6241== For counts of detected and suppressed errors, rerun with: -v
    ==6241== Use --track-origins=yes to see where uninitialised values come from
    ==6241== ERROR SUMMARY: 53 errors from 45 contexts (suppressed: 0 from 0)
    Instruction non permise

  3. #3
    Responsable 2D/3D/Jeux

    Bonjour,

    Valgrind est une bonne idée, même si pour un tel cas, je commencerai par utiliser GDB (comme expliqué ici).
    Aussi, n'oubliez pas de compiler avec l'option -g, pour avoir tous les symboles de débogage pour votre application (cela aide dans la lisibilité des résultats de valgrind et de GDB). Une fois cela fait, vous devriez être capable de nous dire la ligne où le programme crash, ce qui sera une aide non négligeable pour comprendre le souci (peut être même vous arriverez à le régler vous même).
    Vous souhaitez participer à la rubrique 2D/3D/Jeux ? Contactez-moi

    Ma page sur DVP
    Mon Portfolio

    Qui connaît l'erreur, connaît la solution.

  4. #4
    Futur Membre du Club
    merci pour votre aide !


    voici ce que j'ai lorsque j'utilise GDB

    Code :Sélectionner tout -Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    The program being debugged has been started already.
    Start it from the beginning? (y or n) y
    Temporary breakpoint 2 at 0x10d80
    Starting program: /home/hmz/TFE/mouvement/Saccade/main
    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
     
    Temporary breakpoint 2, 0x00010d80 in main ()
    (gdb) next
    Single stepping until exit from function main,
    which has no line number information.
     
    Program received signal SIGSEGV, Segmentation fault.
    strlen () at ../ports/sysdeps/arm/armv6/strlen.S:26
    26      ../ports/sysdeps/arm/armv6/strlen.S: Aucun fichier ou dossier de ce type.
    (gdb) next
     
    Program received signal SIGSEGV, Segmentation fault.
    strlen () at ../ports/sysdeps/arm/armv6/strlen.S:26
    26      in ../ports/sysdeps/arm/armv6/strlen.S
    (gdb)


    j'y comprends pas grand chose malheureusement

  5. #5
    Responsable 2D/3D/Jeux

    J'espère que vous allez lu le tutoriel que j'ai lié précédemment.
    Vous devez maintenant tapez la commande ls dans GDB, une fois que le programme a crashé afin d'obtenir la liste des fonctions appelées au moment du crash.
    Vous souhaitez participer à la rubrique 2D/3D/Jeux ? Contactez-moi

    Ma page sur DVP
    Mon Portfolio

    Qui connaît l'erreur, connaît la solution.