[so] Tema 3 - probleme testare (the nightmare continues)

George Dita george.dita at gmail.com
Sun May 11 02:25:16 EEST 2008


Obtin un segmentation fault de la tester si se opreste tot la testul 3
partea de ram poisoning

test: init3.......................................................passed
test: ram_size....................................................passed
test: swap_size...................................................passed
Trece!!!
Trece!!!
test: access......................................................passed
test: access......................................................passed
test: access......................................................passed
test: access......................................................passed
test: access......................................................passed
test: access......................................................passed
1.Trece!!!
Segmentation fault (core dumped)

Programul moare aici:

test_ram_swap (6, 3);
    printf("Trece!!!\n");
    poison_ram_swap (6, 3);
    printf("Trece!!!\n");
    sig_handler_fault = 0;
    set_signal ();

    rand_pos = (rand () % (p_sz / 4 - 2)) * 4;

    for (i = 0; i < 3; i++) {
        _read (i, PAGE_FAULT, rand_pos);
        _read (i, NO_PAGE_FAULT, rand_pos + 4);
    }
    printf("1.Trece!!!\n");
    ram_sync ();
    printf("Trece!!!\n");
    fflush(stdout);
    check_ram0 (3);

     In traducere crapa cand executa mem_sync() functie care e testata si nu
are de ce sa genereze o astfel de eroare. Inca o intrebare: fisierele
trebuie sa aibe acces de read/write mereu? Si doar memoria virtuala sa aibe
protection none, read_only etc?
-- 
George Dita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20080511/8fef0604/attachment.htm 


More information about the so mailing list