php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10347 Core Dump when selecting TIMESTAMP with FreeTDS and SQL Server
Submitted: 2001-04-16 12:37 UTC Modified: 2002-01-28 10:40 UTC
From: sal at wiggum dot com Assigned:
Status: No Feedback Package: Sybase (dblib) related
PHP Version: 4.0.4pl1 OS: Linux Kernel 2.2.16
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sal at wiggum dot com
New email:
PHP Version: OS:

 

 [2001-04-16 12:37 UTC] sal at wiggum dot com
When I try and select a TIMESTAMP column from SQL Server, php core dumps.   I am using PHP 4.0.4pl1, with FreeTDS 0.51 and SQL Server 7.0 SP1 on kernel 2.2.16, glibc-2.2

Something as simple as:
SELECT dateJoined FROM members;

will cause a core dump

The bad line in add_string_to_string is :
memcpy(result->value.str.val+op1->value.str.len, op2->value.str.val, op2->value.str.len);

GDB values:
(gdb) print result->value.str.val+op1->value.str.len
$1 = 0x81d3be2 ""
(gdb) print op2->value.str.val
$2 = 0x81d08e4 ""
(gdb) print  op2->value.str.len
$3 = -1

(gdb) bt
#0  0x40791ace in memcpy () from /lib/libc.so.6
#1  0x80eda9e in add_string_to_string (result=0xbfffdaa0, op1=0xbfffdaa0, op2=0x81c6c2c)
    at zend_operators.c:1004
#2  0x8125efe in execute (op_array=0x81c69b4) at ./zend_execute.c:1389
#3  0x812679a in execute (op_array=0x81b7d6c) at ./zend_execute.c:1559
#4  0x80f0ef8 in zend_execute_scripts (type=8, file_count=3) at zend.c:729
#5  0x8061b18 in php_execute_script (primary_file=0xbffff6b0) at main.c:1221
#6  0x805fcf8 in main (argc=2, argv=0xbffff764) at cgi_main.c:738
#7  0x40727f31 in __libc_start_main (main=0x805f434 <main>, argc=2, ubp_av=0xbffff764, 
    init=0x805d784 <_init>, fini=0x81309dc <_fini>, rtld_fini=0x4000e274 <_dl_fini>, 
    stack_end=0xbffff75c) at ../sysdeps/generic/libc-start.c:129

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-30 15:07 UTC] fmk@php.net
This is not related to the mssql extension. You are using the sybase extension.
 [2002-01-07 02:30 UTC] lobbin@php.net
Can you:
   - try a newer version of freetds
   - try this with PHP 4.1.1

and see if you still have this problem?
 [2002-01-28 10:40 UTC] sander@php.net
No feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 16:01:29 2024 UTC