Open GoogleCodeExporter opened 8 years ago
So the URL being given is exactly as you attached?
I'll look into the regular expression issue and will run some local benchmarks
with it to find out where its looping, it should never cause a seg fault.
A URL does have a length limit according to the RFC specs so I'll also look
into that (though I'm not sure how we'd handle it if a URL did exceed the
limit).
Original comment by cleaver....@gmail.com
on 16 Jan 2012 at 9:20
Yes, the URL was given exactly as attached. The lack of any whitespace is what
caused my preliminary regex that extracts all the URLs from a document to
extract it all as one "URL".
Original comment by mikegillis677
on 16 Jan 2012 at 9:30
Could you try on this new version please? I've completely rewritten the
function to use a more lightweight (but just as effective) regex, it solved the
seg. fault on my test rig.
http://phpgsb.googlecode.com/svn/trunk/phpgsb.class.php
Diff:
http://code.google.com/p/phpgsb/source/diff?spec=svn35&r=35&format=side&path=/tr
unk/phpgsb.class.php&old_path=/trunk/phpgsb.class.php&old=34
Original comment by cleaver....@gmail.com
on 17 Jan 2012 at 12:50
Thanks for the updated version.
Unfortunately, I'm still getting the segmentation fault on both of my systems.
In both cases, the segmentation fault is occurring on the following line in the
revised method:
preg_match($loose, $url, $match);
Original comment by mikegillis677
on 17 Jan 2012 at 5:23
Before I forget... both of my systems are running php 5.1.6 (that's the version
that we have support for on the hosted RHEL server). Not sure if that's
relevant to the debug process.
Original comment by mikegillis677
on 17 Jan 2012 at 5:45
Thats a shame, could you email me a printout of your php info, I want to check
a few of your settings (such as memory per instance etc).
Just put the following in a text file, save as phpinfo.php and run:
<?php phpinfo(); ?>
Meanwhile I'll try and run some benchmarks as seg faults are usually caused by
high memory consumption.
Original comment by cleaver....@gmail.com
on 17 Jan 2012 at 6:41
Oh and to get my email address just click my linked username above and it
should be on that page.
Original comment by cleaver....@gmail.com
on 17 Jan 2012 at 6:53
Thanks for the info. I'm running on http://gsbtool.beaver6813.com/ulookup.php
and the peak memory usage isn't actually very high ~3.29MB. How are you seeing
the seg fault trigger, from CLI or browser? Trying to work out the next steps
to try and recreate.
Original comment by cleaver....@gmail.com
on 17 Jan 2012 at 8:36
[deleted comment]
@mike I'm still investigating this, I've been real busy so haven't much time to
setup my test rig, but I haven't forgotten :)
Original comment by cleaver....@gmail.com
on 22 Jan 2012 at 7:51
Original issue reported on code.google.com by
mikegillis677
on 16 Jan 2012 at 6:35Attachments: