| Deutsch English Français Italiano |
|
<101t1fh$1op7a$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!news.quux.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: "Craig A. Berry" <craigberry@nospam.mac.com>
Newsgroups: comp.os.vms
Subject: Re: FreeTDS port to VMS V9.x on x86?
Date: Thu, 5 Jun 2025 16:16:33 -0500
Organization: A noiseless patient Spider
Lines: 85
Message-ID: <101t1fh$1op7a$1@dont-email.me>
References: <101n7gq$4m9b$1@dont-email.me>
<683f3086$0$693$14726298@news.sunsite.dk> <101ncau$57on$1@dont-email.me>
<101nqij$9edo$1@dont-email.me> <101sb4a$1ioac$1@dont-email.me>
<101shm9$1l3ag$1@dont-email.me> <101skdr$1lvhe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 05 Jun 2025 23:16:33 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="f655ec55f587ed892f556df9198372f6";
logging-data="1860842"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IgliNOPPmDx9jqbIETy2+kFEKzii2mZE="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:M6c/Lf+gZHiq6tTO4RDUlyoq41I=
Content-Language: en-US
In-Reply-To: <101skdr$1lvhe$1@dont-email.me>
Bytes: 3308
On 6/5/25 12:33 PM, Simon Clubley wrote:
> On 2025-06-05, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 6/5/2025 10:55 AM, Arne Vajhøj wrote:
>>> Updates fail with:
>>>
>>> TDS DBLIB error: Unable to allocate sufficient memory
>>> TDS OS error: error 0
>>> TDS error in dbcmd
>>>
>>> But I suspect that is a bug in my code.
>>
>> Mysterious.
>>
>> stat = dbfcmd(con, "INSERT INTO t1 VALUES(%d, '%s')", f1, f2esc);
>>
>> fails.
>>
>> char buf[1000];
>> sprintf(buf, "INSERT INTO t1 VALUES(%d, '%s')", f1, f2esc);
>> stat = dbcmd(con, buf);
>>
>> works.
>>
>> And DBLIB.C contains:
>>
>> RETCODE
>> dbfcmd(DBPROCESS * dbproc, const char *fmt, ...)
>> {
>> va_list ap;
>> char *s;
>> int len;
>> RETCODE ret;
>>
>> tdsdump_log(TDS_DBG_FUNC, "dbfcmd(%p, %s, ...)\n", dbproc, fmt);
>> CHECK_CONN(FAIL);
>> CHECK_NULP(fmt, "dbfcmd", 2, FAIL);
>>
>> va_start(ap, fmt);
>> len = vasprintf(&s, fmt, ap);
>> va_end(ap);
>>
>> if (len < 0) {
>> dbperror(dbproc, SYBEMEM, errno);
>> return FAIL;
>> }
>>
>> ret = dbcmd(dbproc, s);
>> free(s);
>>
>> return ret;
>> }
>>
>> ????
>>
>
> Does this _exact_ code work on Alpha ?
>
> If yes, try building your test code with compiler optimisation disabled.
>
> If that doesn't work, try building the library itself with compiler
> optimisation disabled.
$ mmk clean
$ @[.vms]configure
$ mmk/MACRO=__DEBUG__=1
should do that plus provide debug versions of all the library code.
> 32-bit or 64-bit build ?
It's the traditional DEC C compiler interface, so all the pointers would
be 32-bit, if that's what you're asking.
> Any compiler build warnings either in the library or your test code ?
> (Try setting warnings to fatal to abort the build if you get a lot of
> output during building).
>
> I am trying to eliminate the possibility you may have stumbled across
> a compiler bug.
>
> Simon.
>