To FOUR-F

Тема в разделе "WASM.ENGLISH", создана пользователем dcskm4200, 18 май 2005.

  1. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Could you check the code where is some error?
     
  2. Four-F

    Four-F New Member

    Публикаций:
    0
    Регистрация:
    31 авг 2002
    Сообщения:
    1.237
    Sorry, but I have not enough time for this. You can post it here. Probably someone...
     
  3. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    hello,FOUR-F.

    sometimes is ok, another times is crash.

    I'v used all of memAlloc.

    here is all of the source codes and Error msg(openning with UltraEdit) in running my pc.

    if someone can't do that, i hope you look it about 10 minutes.



    regards

    [​IMG] _388682950__lv_15.zip
     
  4. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
  5. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
  6. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Oh,Keeping eye opened for somebody.

    it maybe as talked as Iczelion

    " Don't make any mistake, multithreading programs are harder to debug and maintain. This sort of bug seems to happen at random which is very hard to track down. "



    regards
     
  7. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    hello! try this
     
  8. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    sorry



    [​IMG] _1716475105__lv_15.zip



    also, i forgot to unkomment wm_timer processing - do it by yourself.



    regards!
     
  9. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
  10. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    do not understand: you still have the error? it works on my pc now...



    there was that:

    1.
    Код (Text):
    1.     invoke SendARP,dwIpaddr,0,ADDR pulMac,ADDR ulLen
    2. ;   .IF ulLen != 0
    3.     .IF !eax


    you should depend on result returned by SendARP: if eax=NO_ERROR (=0) then ok.



    2.
    Код (Text):
    1.     invoke HeapAlloc,HeapHandle,HEAP_ZERO_MEMORY or HEAP_NO_SERIALIZE,128d
    2.     mov lpNamebuf,eax
    3. ...
    4.     .if eax !=0             ;see if gethost...worked
    5.         xmov lpNamebuf,[eax]        ;mov the pointer returnt by gethost into eax
    6.     .else
    7.         xmov lpNamebuf,offset unknown
    8.     .endif
    9. ...
    10.     invoke HeapFree,HeapHandle,HEAP_NO_SERIALIZE,lpNamebuf


    it looks slightly strange, isn't? you allocate memory block, store handle (offset) into pNamebuf, then replace this value with offset, returned by gethostbyaddr, from structure, allocated to thread by system, and then try to free memory not allocated by you: you no need in that memory block at all in real. all strings i replaced in the source are commented, not deleted, so, you can walk through them. hope, this will help ;) if you ask i can post exe. regards!
     
  11. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Hello,shoo

    Thanks you.



    the code sometimes is ok, another times is crashed. I did not modified the source code which you posted here.



    here is exe. you try use ida to see That it is as same as you created Lv_15.exe
     
  12. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
  13. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    you wrong ;)
    Код (Text):
    1. .text:004010B6                 call    SendARP
    2. .text:004010BB                 cmp     [ebp+var_C], 0
    .
     
  14. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    Hello,shoo

    Please post your Lv_15.exe here.



    regards
     
  15. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
  16. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
  17. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
  18. dcskm4200

    dcskm4200 New Member

    Публикаций:
    0
    Регистрация:
    12 окт 2004
    Сообщения:
    173
    Адрес:
    China
    hello,shoo

    used follow files to created lv_15.exe

    ;======================================

    cd #2



    _1498696062__dcskm42001.zip

    ;======================================

    reboot my pc, running lv_15.exe now,

    error msg:dntknw:part of all)



    [​IMG] 2118721895__ER_MSG2005_05_20__20;06;54.rar
     
  19. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    they both are empty, only "Error Msg Dump: " present...

    well, i have two thoughts:

    1.may be it is needed to test it by somebody else under xp (i have w2k)

    2.another problem could be in the count of the threads: my subnet has 254 ips, your could have 65534 and even more. the way, choosed for this program, is easy, but could be heavy to OS - it produces explosion of threads, but their count is limited by OS. try to limit ip-range and try it again to test fast, and at common, it would be better to check count of currently running threads and limit them to wise quantity (5-10): your thread could fail allocate memory with HeapAlloc, for example, but this is not checking within program!



    regards!
     
  20. shoo

    shoo New Member

    Публикаций:
    0
    Регистрация:
    17 июл 2003
    Сообщения:
    1.537
    Адрес:
    Ukraine
    also it is not checked - was thread created at all: you do not check if it is not zero. well, you have weekend to mess with it ;) regards!