dets fatal bug

Hans Bolinder hasse@REDACTED
Tue Dec 23 09:35:17 CET 2003


[Klacke:]
> I've started to distrust dets:

Sorry to hear that. Next release of Open Source Erlang will have the
patch of stdlib/src/dets_v9.erl attached below.

I trust you will report any further problems you encounter.

Best regards,

Hans Bolinder, Erlang/OTP

--------------------

215d214
< -define(NO_KEYS_POS, (?D_POS + 16)).
419c418
< 	    {NewHead, InitSegment, [SegPointer, InitArrPart, ArrPartPointer]};
---
> 	    {NewHead, InitSegment, [InitArrPart, SegPointer, ArrPartPointer]};
1225c1224
<     NoParts = no_parts(Head#head.m),
---
>     NoParts = no_parts(Head#head.next),
1589c1588,1592
<     NoColls = case H1#head.no_collections of
---
>     FileHeader = file_header(H1, FreeListsPointer, ?CLOSED_PROPERLY),
>     dets_utils:pwrite(H1, [{0, FileHeader}]).
> 
> file_header(Head, FreeListsPointer, ClosedProperly) ->
>     NoColls = case Head#head.no_collections of
1597,1598c1600
<     FileHeader = file_header(H1, FreeListsPointer, ?CLOSED_PROPERLY, CW),
<     dets_utils:pwrite(H1, [{0, FileHeader}]).
---
>     file_header(Head, FreeListsPointer, ClosedProperly, CW).
2358a2361,2362
>     NewNoObject = Head#head.no_objects + DeltaObjects,
>     NewHead = Head#head{no_objects = NewNoObject, no_keys = NewNoKeys},
2361c2365
< 	    NewNoKeys > Head#head.max_no_slots ->
---
> 	    NewNoKeys > NewHead#head.max_no_slots ->
2366c2370
< 		[{?NO_KEYS_POS, <<NewNoKeys:32>>} | Ws]
---
>                 [{0, file_header(NewHead, 0, ?NOT_PROPERLY_CLOSED)} | Ws]
2368,2369c2372
<     NewNoObject = Head#head.no_objects + DeltaObjects,
<     {Head#head{no_objects = NewNoObject, no_keys = NewNoKeys}, NWs}.
---
>     {NewHead, NWs}.



More information about the erlang-questions mailing list