Skip Menu |

This queue is for tickets about the Net-SMTP-SSL CPAN distribution.

Report information
The Basics
Id: 83481
Status: new
Priority: 0/
Queue: Net-SMTP-SSL

Owner: Nobody in particular
Requestors: icrew [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: malloc error when running Net::SMTP::SSL on Mac OS X 10.8.2/Perl 5.12.4
Date: Wed, 20 Feb 2013 07:02:40 -0800
To: "bug-Net-SMTP-SSL [...]" <bug-Net-SMTP-SSL [...]>
From: Ian Crew <icrew [...]>
Download (untitled) / with headers
text/plain 2.3k
I'm running Mac OS X 10.8.2 with Perl 5.12.4 (the version that comes with it). I installed Net::SMTP::SSL via CPAN ('sudo cpan', then 'install Net::SMTP::SSL') Whenever I try to use the perl module, I get an error that looks like: perl(41125) malloc: *** error for object 0x7fff8929d50d: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Abort trap: 6 I've tried to simplify this down as much as possible to narrow down the error. In the following code, it will crash when it tries to run the $smtp->auth line (right after the "About to crash" line). -------------------------------------------------------------------------------- #!/usr/bin/perl use Net::SMTP::SSL; $mailhost = ''; $sender = ''; $sender_acct = 'baz'; $sender_name = 'Foo Bar'; $sender_password = 'password'; $subject = 'Auto notice'; $userEmail = ''; $thisMessage = "Hello from Foo Bar\n"; our $smtp = new Net::SMTP::SSL( $mailhost, Port => 465, #Debug => 1, #Hello => '', #Timeout => 10 ) or die "Could not set up SMTP $!\n$smtp->message"; print "About to crash\n"; # -- Authorize ourselves with the SMTP server -- $smtp->auth($sender_acct, $sender_password); # -- Enter sender mail address. -- $smtp->mail($sender); # -- Enter recipient mails address. -- @success = $smtp->recipient($userEmail, { SkipBad => 1 }); $smtp->data(); # -- This part creates the SMTP headers you see. -- $smtp->datasend("To: <$userEmail> \n"); $smtp->datasend("From: $sender_name <$sender> \n"); $smtp->datasend("Subject: $subject"); # -- line break to separate headers from message body. -- $smtp->datasend("\n"); $smtp->datasend($thisMessage); $smtp->datasend("\n"); $smtp->dataend(); $smtp->quit(); -------------------------------------------------------------------------------- I'm confident it's not an error in my script, as it works fine when I run it on another platform (Perl 5.8.8 on RHEL5). Net::SMTP::SSL installed without errors. There has been a little discussion of this at, if that's helpful. Thanks, Ian

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to