On Tue, 07 Jul 2009, Randy Portnoff wrote:

Hi,

> Can you please tell me if the ADS bug (below) is only an issue with 
> compressed fields or does it affect non-compressed fields as well?

It was very old problem exploited by recent modification.
>From the beginning our ADSRDD was ignoring error code and field
size returned by AdsFieldGet*() functions and too small buffer
were used two extract some fields. When we added support for
fields with variables size (i.e. VARCHAR VFP fields) then the
bug was immediately exploited. I fixed it but I also added
code to generate RT error if any AdsFieldGet*() returns error.
IMHO it's much better to know about any potential problems
immediately. Otherwise problems are hidden often for years
and can be source of some other problems.
F.e. ADS use incompatible with dbase/clipper hidden unlocking for
APPENDED records what breaks documented Clipper/dbase synchronization
rules. For me it's critical bug but for many years no one reported it.
Just simply it was not causing visible immediately problems. Maybe
sometimes someone found that some operations were not blocked as
they should but never located the real reason of problem.
And funny things happened few years ago when the problem had been
fixed (we added workaround for it to our ADSRDD code). People began
to report that in their applications some records were never unlocked.
It simply means that when bug existed they created code in which they
forgot to use dbrunlock() in few places after dbappend() and the fix
exploited wrong code.
I do not like such situations so I prefer to generate RT errors if ACE
library reports error too. It's highly possible that you will never see
new RT errors I added. But if sth is wrong and ADS/ACE reports errors
then now they are not silently ignored but RT error is generated so you
have a chance to locate the reason and fix the problem or if the problem
is deeper and should be resolved in ADSRDD code inform developers about it.

best regards,
Przemek


>   * harbour/contrib/rddads/ads1.c
>     ! fixed minimal record buffer size calculation
>     ! fixed adsGetValue() method hacked to not report errors due to too
>       small field buffer.
>       Warning! Now ADS RDD will report any error as RTE if sth wrong
>       will happen in one of AdsGet*() function when field is read so
>       it's possible that also some other hidden bugs will be exploited
>       and you will see RTE. Please test it.
_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to