php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44292 Segmentation fault in SAPRFC function NewFunction
Submitted: 2008-02-29 13:33 UTC Modified: 2008-03-08 15:43 UTC
From: lars dot a dot johansson at se dot atlascopco dot com Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.3CVS-2008-02-29 (snap) OS: linux
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: lars dot a dot johansson at se dot atlascopco dot com
New email:
PHP Version: OS:

 

 [2008-02-29 13:33 UTC] lars dot a dot johansson at se dot atlascopco dot com
Description:
------------
Hi,
2.6.17-5mdventerprise #1 SMP Wed Sep 13 14:50:48 EDT 2006 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz GNU/Linux

Running the below in 5.2 works OK.

My snap is php5.3-200802231330.
I try to run a BAPI in a SAP system using SAPRFC http://saprfc.sourceforge.net/

I put in the print "NEWFUNCTION" stmts to see how far I get.

function NewFunction ($name)
      {
print "NEWFUNCTION0\n";
          $ix = count ($this->fceList);
          $this->fceList[$ix] = new SAPFunction();
print "NEWFUNCTION1\n";
          $rc = $this->fceList[$ix]->Discover ($this->rfc,strtoupper($name));
print "NEWFUNCTION3\n";
          if ($rc != SAPRFC_OK) {
              $this->fceList[$ix]->Close();
              unset ($this->fceList[$ix]);
              return (false);
          }
print "NEWFUNCTION9\n";
          return ($this->fceList[$ix]);
      }





Reproduce code:
---------------
Its not trivial to supply code to reproduce this bug. If anyone is willing to dig into this please tell me how I should trace my problem, and I hand over the result.

Expected result:
----------------
print "NEWFUNCTION0\n";  
print "NEWFUNCTION1\n";
print "NEWFUNCTION3\n";
print "NEWFUNCTION9\n";


Actual result:
--------------
NEWFUNCTION0
NEWFUNCTION1
Segmentation fault


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-03-01 01:30 UTC] felipe@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2008-03-08 15:37 UTC] lars dot a dot johansson at se dot atlascopco dot com
Hi,
I used a fresh snap and compiled again. This time the SAPRFC works.  I must have done something wrong the last time. I'm sorry for filing this bugreport. (I scrutinized my failing compile but I still do not see what I did wrong though).
Please close my bug and accept my humble apologies.
 [2008-03-08 15:43 UTC] felipe@php.net
No problem. ;)

Thanks.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 19:01:35 2025 UTC