|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-20 13:15 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2016-08-20 13:15 UTC] cmb@php.net
[2016-08-28 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 11:00:01 2025 UTC |
Description: ------------ Hey there, php running into an segmentation fault. I try to insert a json record into my database and mybe pcre become a problem by escaping? Test script: --------------- I'm try to import this by Mysql Pdo. Example-Part of sql insert: '{\"WahlartenLang\":\"\",\"WahlartenKurz\":\"RG,KT,GR,GR+\",\"PostfreimachungVersandta\":\"0\",\"Wahlkreisnummer\":\"09\",\"Wahlbezirksnummer\":\"05041\",\"Waehlernummer\":\"110\",\"Familienname\":\"Schm\\u00f6lling\",\"Vorname\":\"Patrick\",\"Strassenschluessel\":\"76018\", ............ Expected result: ---------------- Successful database insert and no segmentation fault. Actual result: -------------- ============================= Program received signal SIGSEGV, Segmentation fault. ============================= 0x000000000048343b in match (eptr=0x18257d2 "785);\n;", ecode=0x122b797 "\035\"x", mstart=0x1822719 "\"WahlartenLang\\\":\\\"\\\",\\\"WahlartenKurz\\\":\\\"RG,KT,GR,GR+\\\",\\\"PostfreimachungVersandta\\\":\\\"0\\\",\\\"Wahlkreisnummer\\\":\\\"09\\\",\\\"Wahlbezirksnummer\\\":\\\"05041\\\",\\\"Waehlernummer\\\":\\\"110\\\",\\\"Familienname\\\":\\\"Schm"..., offset_top=4, md=0x7fffffff90a0, eptrb=0x0, rdepth=10890) at /usr/src/php5.5/source/php5-5.5.12/ext/pcre/pcrelib/pcre_exec.c:1802 1802 /usr/src/php5.5/source/php5-5.5.12/ext/pcre/pcrelib/pcre_exec.c: Datei oder Verzeichnis nicht gefunden. ============================= Part of Backtrace ============================= #0 0x000000000048343b in match (eptr=0x18257d2 "785);\n;", ecode=0x122b797 "\035\"x", mstart=0x1822719 "\"WahlartenLang\\\":\\\"\\\",\\\"WahlartenKurz\\\":\\\"RG,KT,GR,GR+\\\",\\\"PostfreimachungVersandta\\\":\\\"0\\\",\\\"Wahlkreisnummer\\\":\\\"09\\\",\\\"Wahlbezirksnummer\\\":\\\"05041\\\",\\\"Waehlernummer\\\":\\\"110\\\",\\\"Familienname\\\":\\\"Schm"..., offset_top=4, md=0x7fffffff90a0, eptrb=0x0, rdepth=10890) at /usr/src/php5.5/source/php5-5.5.12/ext/pcre/pcrelib/pcre_exec.c:1802 #1 0x0000000000493f0e in match (eptr=0x18257d2 "785);\n;", ecode=0x122b794 "z", mstart=0x1822719 "\"WahlartenLang\\\":\\\"\\\",\\\"WahlartenKurz\\\":\\\"RG,KT,GR,GR+\\\",\\\"PostfreimachungVersandta\\\":\\\"0\\\",\\\"Wahlkreisnummer\\\":\\\"09\\\",\\\"Wahlbezirksnummer\\\":\\\"05041\\\",\\\"Waehlernummer\\\":\\\"110\\\",\\\"Familienname\\\":\\\"Schm"..., offset_top=4, md=<optimized out>, eptrb=0x0, rdepth=10889) at /usr/src/php5.5/source/php5-5.5.12/ext/pcre/pcrelib/pcre_exec.c:2024 . . . . . #10891 0x000000000049524f in php_pcre_exec (argument_re=0x122b740, extra_data=extra_data@entry=0x7fffffff9310, subject=subject@entry=0x18226c0 "INSERT INTO job_detail \n(job_id, print_id, state_date, record, state_id) \nVALUES \n(,,,'{\\\"WahlartenLang\\\":\\\"\\\",\\\"WahlartenKurz\\\":\\\"RG,KT,GR,GR+\\\",\\\"PostfreimachungVersandta\\\":\\\"0\\\",\\\"Wahlkreisnummer\\\""..., length=length@entry=12569, start_offset=start_offset@entry=0, options=0, offsets=offsets@entry=0x142ba28, offsetcount=offsetcount@entry=6) at /usr/src/php5.5/source/php5-5.5.12/ext/pcre/pcrelib/pcre_exec.c:6945 #10892 0x000000000049aed3 in php_pcre_replace_impl (pce=0x122b820, subject=0x18226c0 "INSERT INTO job_detail \n(job_id, print_id, state_date, record, state_id) \nVALUES \n(,,,'{\\\"WahlartenLang\\\":\\\"\\\",\\\"WahlartenKurz\\\":\\\"RG,KT,GR,GR+\\\",\\\"PostfreimachungVersandta\\\":\\\"0\\\",\\\"Wahlkreisnummer\\\""..., subject_len=12569, replace_val=replace_val@entry=0x17d1a20, is_callable_replace=is_callable_replace@entry=0, result_len=0x7fffffff9450, limit=-1, replace_count=0x7fffffff9454) at /usr/src/php5.5/source/php5-5.5.12/ext/pcre/php_pcre.c:1091 #10893 0x000000000049bc5f in php_pcre_replace (regex=<optimized out>, regex_len=<optimized out>, subject=<optimized out>, subject_len=<optimized out>, replace_val=replace_val@entry=0x17d1a20, is_callable_replace=is_callable_replace@entry=0, result_len=0x7fffffffffff, result_len@entry=0x7fffffff9450, limit=-27564, limit@entry=-1, replace_count=replace_count@entry=0x7fffffff9454) at /usr/src/php5.5/source/php5-5.5.12/ext/pcre/php_pcre.c:997