I am building a wrapper around fgets, and fighting crashes for no reason I can explain.
I have stripped it down as far as I can and it still crashes.
The first inexplicable thing happens during fgets(), which fails for no good reason. perror prints "EOF: Success". The loop quits early due to this mysterious failure, and when wrap_free() is called, the program dies with "*** Error in `./a.out': munmap_chunk(): invalid pointer: 0x0000000000c8f030 ***", where c8f030 was a valid pointer to wrap.
This does not happen at all when buf[] doesn't reside inside the structure. Everything is happy in that case. Clearly an overflow is happening, but I have no idea why or where.
I am not overflowing the bounds of the array. I checked that, and 100 bytes can't be overflowing 4K anyway.
I am definitely allocating enough memory. sizeof(wrap) is larger than 4096 bytes.
The values of wrap and wrap->fp are not being corrupted.
No mysterious properties of ungetc are crashing it. It still dies without it.
We have a Unix system with two hard drives. When we tried to access it this morning it had frozen, and when we rebooted it couldn't find one of the hard drives, and had quite a few bad data blocks on the other. Of course we fear the worst: that the drive is completely gone, but were not sure how... (1 Reply)
Our SUn Solaris Server has crashed second time in 2 days, reason is not known , we are trying to determine what could have gone wrong, any ideas, the power supply seems to be fine, there is no response from keyboard,monitor etc and we had to do a hot boot yesterday..
Any suggestions what could be... (9 Replies)
Hi,
First of all, thanks for your help. I have downloaded freeBSD to study unix
I'm here again 'cause my HP-UX 10.x has "broken". It raise this error:
----------------------------------------------------
Diagnostic System warning:
= 0x1f005000 is POWERFAILED The diagnostic logging... (1 Reply)
hi friends,
i know that when there is a crash then that memory image is
put into /var/adm/crash
but if the system hangs up and if i have access to console of
that machine then how can i take the crash dump manully.
thanks (2 Replies)
I installed solaris 5.9 on a machine SunBlade100 512Mo of RAM and 18Go of hard disc, after the installation I have remark that the machine starts again after 10mn with 15 mn of walk, I downloaded and installed the last patchs on the machine but the poblème persists. someone can help me and tell me... (0 Replies)
Hi, First post. I am not to experienced in the Unix or HP-UX world but I'm learning.
We have some problem with a HP rx4640 server. During boot it states the following:
Checking for LVM volume groups and Activating (if any exist)
Volume group "/dev/vg00" has been successfully changed.
vgchange:... (7 Replies)
I am supporting a server running Solaris 4.3.The server is not having ddicated system administrator and i am requred to do minor maintenance tasks.l From few days, The server is automatically crashing and i just reboot the server. I also do not see anything in /var/adm/messages that can give an... (1 Reply)
Hi,
I need help, one of our servers is down, and all data in that Server are critical:
The Scenario:
-------------
I have a computer with the next architecture:
architecture=IA32
bus_types=PCI2.10,ISA,PnP1.0
hostname=xxx.xxx.xxx (the real name is hidden)
hw_provider=Generic AT... (2 Replies)
Discussion started by: danilosevilla
2 Replies
LEARN ABOUT SUSE
template::plugin::wrap
Template::Plugin::Wrap(3) User Contributed Perl Documentation Template::Plugin::Wrap(3)NAME
Template::Plugin::Wrap - Plugin interface to Text::Wrap
SYNOPSIS
[% USE wrap %]
# call wrap subroutine
[% wrap(mytext, width, initial_tab, subsequent_tab) %]
# or use wrap FILTER
[% mytext FILTER wrap(width, initital_tab, subsequent_tab) %]
DESCRIPTION
This plugin provides an interface to the Text::Wrap module which provides simple paragraph formatting.
It defines a "wrap" subroutine which can be called, passing the input text and further optional parameters to specify the page width
(default: 72), and tab characters for the first and subsequent lines (no defaults).
[% USE wrap %]
[% text = BLOCK %]
First, attach the transmutex multiplier to the cross-wired
quantum homogeniser.
[% END %]
[% wrap(text, 40, '* ', ' ') %]
Output:
* First, attach the transmutex
multiplier to the cross-wired quantum
homogeniser.
It also registers a "wrap" filter which accepts the same three optional arguments but takes the input text directly via the filter input.
Example 1:
[% FILTER bullet = wrap(40, '* ', ' ') -%]
First, attach the transmutex multiplier to the cross-wired quantum
homogeniser.
[%- END %]
Output:
* First, attach the transmutex
multiplier to the cross-wired quantum
homogeniser.
Example 2:
[% FILTER bullet -%]
Then remodulate the shield to match the harmonic frequency, taking
care to correct the phase difference.
[% END %]
Output:
* Then remodulate the shield to match
the harmonic frequency, taking
care to correct the phase difference.
AUTHOR
Andy Wardley <abw@wardley.org> <http://wardley.org/>
The Text::Wrap module was written by David Muir Sharnoff with help from Tim Pierce and many others.
COPYRIGHT
Copyright (C) 1996-2007 Andy Wardley. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Template::Plugin, Text::Wrap
perl v5.12.1 2008-11-13 Template::Plugin::Wrap(3)